[Rpm-maint] [rpm-software-management/rpm] Prevent buffer overruns in findPreambleTag() for language string (PR #4188)

Dave Cantrell notifications at github.com
Wed Apr 22 13:05:07 UTC 2026


@dcantrell commented on this pull request.



> @@ -1177,14 +1179,17 @@ static int findPreambleTag(rpmSpec spec, PreambleRec * pr, const char ** macro,
     case 2:
 	if (*s == ':') {
 	    /* Type 1 is multilang, 2 is qualifiers with no defaults */
-	    strcpy(lang, (p->type == 1) ? RPMBUILD_DEFAULT_LANG : "");
+	    strlcpy(lang, (p->type == 1) ? RPMBUILD_DEFAULT_LANG : "", langsize);

And updated.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/4188?email_source=notifications&email_token=ADLPZU23SXBTBAJDBFLLLH34XC7QHA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTIMJVGQ4DMNBXGI2KM4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOS6XA4S7OJSXM2LFO5PW433UNFTGSY3BORUW63TTL5RWY2LDNM#discussion_r3124133086
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/4188/review/4154864724 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20260422/d3ce4b2f/attachment.htm>


More information about the Rpm-maint mailing list