diff options
Diffstat (limited to 'dimension/lexer.l')
-rw-r--r-- | dimension/lexer.l | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/dimension/lexer.l b/dimension/lexer.l index 4beeee7..d198b62 100644 --- a/dimension/lexer.l +++ b/dimension/lexer.l @@ -97,6 +97,9 @@ if (string_length + len + 1 >= string_length) { \ string_extent = 2*(string_length + len + 1); \ lvalp->value = realloc(lvalp->value, string_extent); \ + if (!lvalp->value) \ + dmnsn_error(DMNSN_SEVERITY_HIGH, \ + "Couldn't allocate space for token value."); \ } \ \ strncpy(lvalp->value + string_length, str, len + 1); \ |