• Jaime Velasco Juan's avatar
    Never create nvp with NULL lhs or rhs · b7a64b82
    Jaime Velasco Juan authored
    After 1305fc "Fix string overrun bugs in nvp.c" a header such as
    "Content-Type: text/html; charset=utf-8;" (note trailing semicolon)
    creates a struct nvp {type=NVP_NAMEVALUE, lhs=NULL, rhs=NULL} and
    causes a segmentation fault afterwards when those pointers are used.
    
    Also unconditionally free temporal values, free(NULL) is valid.
    b7a64b82
nvp.c 11.1 KB