Skip to content

Commit 7516e6b

Browse files
fix: V-001 security vulnerability
Automated security fix generated by Orbis Security AI
1 parent afc45ea commit 7516e6b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

qdl.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,8 @@ static int decode_programmer_archive(struct sahara_image *blob, struct sahara_im
251251
images[id].name = strdup(tok);
252252
images[id].len = filesize;
253253
images[id].ptr = malloc(filesize);
254+
if (!images[id].ptr)
255+
goto err;
254256
memcpy(images[id].ptr, ptr, filesize);
255257

256258
ptr += filesize;
@@ -377,6 +379,7 @@ int decode_sahara_config(struct sahara_image *blob, struct sahara_image *images,
377379

378380
xmlFreeDoc(doc);
379381
free(blob_name_buf);
382+
blob_name_buf = NULL;
380383

381384
free(blob->ptr);
382385
blob->ptr = NULL;

0 commit comments

Comments
 (0)