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

Panu Matilainen notifications at github.com
Wed Apr 22 06:22:08 UTC 2026


@pmatilai 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);

These function names are such consonant salad, even German pales in comparison.

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

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


More information about the Rpm-maint mailing list