mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-30 12:44:07 +00:00
Check for malloc failure.
This commit is contained in:
parent
313466fdff
commit
f380e7d4b0
|
@ -147,8 +147,9 @@ int main(int argc, char *argv[])
|
|||
sprintf(dim_str, "_%dx%d.yuv", cfg->width, cfg->height);
|
||||
left_len = strlen(cfg->debug);
|
||||
right_len = strlen(dim_str);
|
||||
realloc(cfg->debug, left_len + right_len + 1);
|
||||
strcpy(cfg->debug + left_len, dim_str);
|
||||
if (realloc(cfg->debug, left_len + right_len + 1)) {
|
||||
strcpy(cfg->debug + left_len, dim_str);
|
||||
}
|
||||
}
|
||||
|
||||
// Do more validation to make sure the parameters we have make sense.
|
||||
|
|
Loading…
Reference in a new issue