[info-performer] pfdInitConverters segfaults if LD_LIBRARY_PATH too long

New Message Reply Date view Thread view Subject view Author view

From: Alexander Lechner (alexander.lechner++at++vertigo-systems.de)
Date: 09/30/2002 10:01:14


Hi all.
Just a small bug report, tested unter Linux and Performer 2.52.
If your LD_LIBRARY_PATH is too long (which mine uses to be), Performer
crashes in pfdInitConverters
of more precisely:

pfdLoadFile.c:
 
 free(pfLibraryPath);
 free(libraryPath);
 free(rootPath); --> segfault. pfdLoadFile.c, line 444.

This is due to a too smal newPath (line 414)
I would suggest to change
    /* form new search path for locating loader */
    newPath = malloc(1024 + strlen(libraryPath) + 2*strlen(rootPath));

into

    /* form new search path for locating loader */
    newPath = malloc(1024 + 2*strlen(libraryPath) + 2*strlen(rootPath));

because the sprintf later on will print libraryPath twice into newPath!

Regards,

Alex

alexander.lechner++at++vertigo-systems.de


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon Sep 30 2002 - 10:01:37 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.