The following issue has been RESOLVED.
============================================================
==========
http://w
ww.dbmail.org/mantis/view.php?id=712
============================================================
==========
Reported By: hinote
Assigned To: paul
============================================================
==========
Project: DBMail
Issue ID: 712
Category: General
Reproducibility: have not tried
Severity: crash
Priority: normal
Status: resolved
target:
Resolution: fixed
Fixed in Version: 2.2.11
============================================================
==========
Date Submitted: 19-Jun-08 16:16 CEST
Last Modified: 01-Jul-08 10:44 CEST
============================================================
==========
Summary: traces to stderr may cause core
dumps if hostname
>=16
Description:
One will get core dumps on some systems with hostname longer
than 15.
That's due to the following code in debug.c:
char hostname[16];
...
memset(&hostname,' ',16);
gethostname(hostname,16);
- it's stated for gethostname() that the resulting string
copied to the
array do not have to be zero-terminated if the hostname does
not fit into
the array (depends on the platform).
(same problematic code persists in the 2.3.x branch)
============================================================
==========
------------------------------------------------------------
----------
hinote - 19-Jun-08 16:19
------------------------------------------------------------
----------
oops, the original code in 2.2.10 was
gethostname(&hostname,16);
instead of
gethostname(hostname,16);
as I stated above.
I've changed it locally to
gethostname(hostname,16);
in order to eliminate a compiler warning here.
Please consider this (cosmetic indeed) modification as
well...
------------------------------------------------------------
----------
paul - 01-Jul-08 10:44
------------------------------------------------------------
----------
Thanks for pointing this out.
I've fixed the code involved.
Issue History
Date Modified Username Field
Change
============================================================
==========
19-Jun-08 16:16 hinote New Issue
19-Jun-08 16:19 hinote Note Added: 0002575
19-Jun-08 16:35 hinote Issue Monitored: hinote
01-Jul-08 10:44 paul Note Added: 0002585
01-Jul-08 10:44 paul Assigned To
=> paul
01-Jul-08 10:44 paul Status new
=> resolved
01-Jul-08 10:44 paul Resolution open
=> fixed
01-Jul-08 10:44 paul Fixed in Version
=> 2.2.11
============================================================
==========
_______________________________________________
Dbmail-dev mailing list
Dbmail-dev dbmail.org
http://twister.fastxs.net/mailman/listinfo/dbmail-dev
|