X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Falloc_entry.c;h=219c76e6f4150f1c7f628cad924398d6cffc5aa3;hp=10c4fc75cb738e2f8ea3a3a5c5e8109acf3d0499;hb=00351a08b43e8b1c62e2c2d79b62ddca8531cfba;hpb=f8401f5e8669eadd551fde12da7de661c18fa4f2 diff --git a/ncurses/tinfo/alloc_entry.c b/ncurses/tinfo/alloc_entry.c index 10c4fc75..219c76e6 100644 --- a/ncurses/tinfo/alloc_entry.c +++ b/ncurses/tinfo/alloc_entry.c @@ -48,7 +48,7 @@ #include -MODULE_ID("$Id: alloc_entry.c,v 1.73 2022/05/08 00:11:44 tom Exp $") +MODULE_ID("$Id: alloc_entry.c,v 1.74 2022/08/20 18:03:14 tom Exp $") #define ABSENT_OFFSET -1 #define CANCELLED_OFFSET -2 @@ -106,9 +106,10 @@ _nc_save_str(const char *string) { char *result = 0; size_t old_next_free = next_free; - size_t len; if (stringbuf != NULL) { + size_t len; + if (!VALID_STRING(string)) string = ""; len = strlen(string) + 1;