Menu

#8 set_name in defaultfont.h fails with

open
nobody
None
5
2004-03-15
2004-03-11
No

Latest release 2.2 reveals an issue with set_name.

When called with "set_name("built-in pseudofont");" in
defaultfont.C, set_font just changes the pointer, but
then our string disappears.
Should use strdup. Patch attached.

Discussion

  • Peter Johanson

    Peter Johanson - 2004-03-15
    • summary: set_name in defaultfont.h fails with "set_name("foo")" --> set_name in defaultfont.h fails with
     
  • Peter Johanson

    Peter Johanson - 2004-03-15

    Logged In: YES
    user_id=789535

    Realized i didn't attach the fix. Attached is the easy fix,
    but i think it'd be better to have set_name use strdup on
    the passed character array, and fix the other calls to
    set_name to *not* use like they do currently (e.g:
    set_name(strdup(fname));)

     
  • Peter Johanson

    Peter Johanson - 2004-03-15

    Fix to make the one call to set_name use strdup

     

Log in to post a comment.