Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#31 Memmory allocation error

Critical
closed-fixed
nobody
5
2002-04-28
2002-04-14
Anonymous
No

I found a bug in the argument parser. It will have
the system behave unpredicably when different
pathnames are used. This is a small fix (incomplete,
the memory should also be released)

diff -urN pnm2ppa/pnm2ppa.c pnm2ppa-new/pnm2ppa.c
--- pnm2ppa/pnm2ppa.c Sat Nov 11 20:53:03 2000
+++ pnm2ppa-new/pnm2ppa.c Sun Apr 14 21:48:40
2002
@@ -156,7 +156,7 @@
a user-specifed file *File_path may later
be opened;
should any extra validation of this be
performed now ?
*/
- path = File_path;
+ path = strndup(File_path,MAXPATHLEN);
return path;
}
}

Discussion

  • Duncan
    Duncan
    2002-04-28

    Logged In: YES
    user_id=5644

    fixed in CVS.
    will eventually be in a pnm2ppa-1.11 release.
    thanks

     
  • Duncan
    Duncan
    2002-04-28

    • status: open --> open-fixed
     
  • Duncan
    Duncan
    2002-04-28

    • status: open-fixed --> closed-fixed