Menu

#79 Fatal alloc error in ns_mktemp

Bug
closed-duplicate
gustafn
None
5
2016-11-20
2016-11-20
No

Current Source Code for NsTclMkTempObjCmd (lines 241-265 nsd/tclfile.c)

russell@boron /web/servers/ns $ bin/nsd -c 2>/tmp/log.txt
% ns_mktemp
/web/servers/ns/tmp/ns-L7Ft2R
% ns_mktemp /tmp/XXXXXX
Aborted
russell@boron /web/servers/ns $

Log File:
[20/Nov/2016:09:58:54][15313.7f69e3072700][-main-] Notice: nsmain: security info: uid=1000, euid=1000, gid=1001, egid=1001
[20/Nov/2016:09:58:54][15313.7f69db736700][-conn:default:0-] Notice: thread initialized (0.030467 secs)
[20/Nov/2016:09:59:21][15313.7f69e0cd6700][-command-] Fatal: alloc: invalid block: 0x7f69dc004ba0: 0 0

Fixed Source Code (line 261 changed)

russell@boron /web/servers/ns $ bin/nsd -c 2>/tmp/log.txt
% ns_mktemp
/web/servers/ns/tmp/ns-8CHHzi
% ns_mktemp /tmp/XXXXXXX
/tmp/Xm9gjdO
%

Log File:
[20/Nov/2016:10:07:18][17971.7f4856026700][-main-] Notice: nsmain: security info: uid=1000, euid=1000, gid=1001, egid=1001
[20/Nov/2016:10:07:18][17971.7f4852bbe700][-conn:default:0-] Notice: thread initialized (0.019944 secs)

diff:

261c261
< char *buffer = strdup(templateString);


    char *buffer = ns_strdup(templateString);

Discussion

  • gustafn

    gustafn - 2016-11-20

    This bug is a duplicate of issue #77 and is fixed in the current release 4.99.14

    https://sourceforge.net/p/naviserver/bugs/77/

     
  • gustafn

    gustafn - 2016-11-20
    • status: open --> closed-duplicate
     

Log in to post a comment.

MongoDB Logo MongoDB