Skip to content
Snippets Groups Projects
Commit 70af46a2 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Fix for b593c251

The commit just the zero-length behaviour from uninitialized use
with possible undefined behaviour to guaranteed undefined behaviour.
parent dd2fc88f
No related branches found
No related tags found
No related merge requests found
...@@ -2045,6 +2045,8 @@ all_done: ...@@ -2045,6 +2045,8 @@ all_done:
size_t mlen = 0; size_t mlen = 0;
char *out; char *out;
if (end == NULL)
return;
// First, calculate the required length... // First, calculate the required length...
for (p = cterm->strbuf; p <= end;) { for (p = cterm->strbuf; p <= end;) {
if (*p == '!') { if (*p == '!') {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment