libextractor

GNU libextractor
Log | Files | Refs | Submodules | README | LICENSE

commit 282992945637c691fa0b04a4680618a435cc7348
parent e93492b823b729a1db476335df44156ae55eef07
Author: Christian Grothoff <christian@grothoff.org>
Date:   Tue, 30 Jun 2026 18:40:50 +0200

handle failure of rpmtdNextUint32

Diffstat:
Msrc/plugins/rpm_extractor.c | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/plugins/rpm_extractor.c b/src/plugins/rpm_extractor.c @@ -350,8 +350,11 @@ EXTRACTOR_rpm_extract_method (struct EXTRACTOR_ExtractContext *ec) { char tmp[80]; uint32_t *v = rpmtdNextUint32 (p); - time_t tp = (time_t) *v; + time_t tp; + if (NULL == v) + break; + tp = (time_t) *v; if (NULL == ctime_r (&tp, tmp)) break; if ( (strlen (tmp) > 0) && @@ -376,6 +379,8 @@ EXTRACTOR_rpm_extract_method (struct EXTRACTOR_ExtractContext *ec) char tmp[14]; uint32_t *s = rpmtdNextUint32 (p); + if (NULL == s) + break; snprintf (tmp, sizeof (tmp), "%u",