Prevent crash if s == NULL
This commit is contained in:
parent
7f8e1cecab
commit
d46cd894cc
|
|
@ -1395,6 +1395,8 @@ nupa_assignment(dico_t *dico, const char *s, char mode)
|
||||||
bug: we cannot rely on the transformed line, must re-parse everything!
|
bug: we cannot rely on the transformed line, must re-parse everything!
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
|
if (!s || !*s)
|
||||||
|
return 1;
|
||||||
/* s has the format: ident = expression; ident= expression ... */
|
/* s has the format: ident = expression; ident= expression ... */
|
||||||
const char * const s_end = s + strlen(s);
|
const char * const s_end = s + strlen(s);
|
||||||
const char *p = s;
|
const char *p = s;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue