Skip to content

Commit

Permalink
stop segfault with mport info <random name>
Browse files Browse the repository at this point in the history
  • Loading branch information
laffer1 committed Oct 13, 2024
1 parent 8911211 commit 9ac6cbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libmport/info.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ mport_info(mportInstance *mport, const char *packageName) {
char flatsize_str[8];
humanize_number(flatsize_str, sizeof(flatsize_str), flatsize, "B", HN_AUTOSCALE, HN_DECIMAL | HN_IEC_PREFIXES);

if (indexEntry == NULL || *indexEntry == NULL) {
if (packs !=NULL && (indexEntry == NULL || *indexEntry == NULL)) {
asprintf(&info_text,
"%s-%s\n"
"Name : %s\nVersion : %s\nLatest : %s\nLicenses : %s\nOrigin : %s\n"
Expand Down

0 comments on commit 9ac6cbe

Please sign in to comment.