Menu

#5240 If a temporary file cannot be opened Tcl_LoadFile can crash

pending-fixed
5
2014-09-04
2013-05-18
Roy Keene
No

copyToPtr can be NULL and it should be checked before passing it to Tcl_IncrRefCount()

http://core.tcl.tk/tcl/artifact/26a06b015bfec491bb32903223af5152b3ceeb0d?ln=3230-3231

Prelimnary patch attached, however after applying this patch I then get:
Tcl_FSGetFileSystemForPath called with NULL object
Segmentation fault (core dumped)

Discussion

  • Roy Keene

    Roy Keene - 2013-05-18
    • summary: If a temporary file cannot be opened ... can segfault --> If a temporary file cannot be opened Tcl_LoadFile can crash
     
  • Roy Keene

    Roy Keene - 2013-05-18

    Preliminary patch

     
  • Don Porter

    Don Porter - 2013-05-20

    Committed to trunk a forward porting of the
    logic in the 8.5 branch on how to react when
    NULL is returned. Please comment if the solution
    is not satisfactory.

    Looks like the bug came in with TIP 357 implementation.

     
  • Don Porter

    Don Porter - 2013-05-20
    • status: open --> pending-fixed
     
MongoDB Logo MongoDB