Skip to content

Commit f6865e2

Browse files
authored
kpatch_storage: put an end to description string loaded
Description string should be ended up with a '\0'.
1 parent 42f3ed5 commit f6865e2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/kpatch_storage.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,10 @@ char *storage_get_description(kpatch_storage_t *storage,
377377
if (rv == -1)
378378
goto err_free;
379379

380-
if (rv == 0)
380+
if (rv == 0) {
381+
desc[sz] = '\0';
381382
break;
383+
}
382384

383385
sz += rv;
384386
}

0 commit comments

Comments
 (0)