Summary: | net-mail/altermime: fails with _FORTIFY_SOURCE=2 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Diego Elio Pettenò (RETIRED) <flameeyes> |
Component: | New packages | Assignee: | Net-Mail Packages <net-mail+disabled> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | esigra |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 260867, 259417 | ||
Attachments: |
Build log
Patch to fix length parameter passed to snprintf |
Description
Diego Elio Pettenò (RETIRED)
2010-05-20 20:43:33 UTC
Created attachment 232277 [details]
Build log
Created attachment 232511 [details, diff]
Patch to fix length parameter passed to snprintf
I cannot reproduce this problem with glibc-2.10 and gcc 4.3, but I see a problem which is likely the reason for the error message. The call to snprintf passes buffer A, but the size of buffer B, where buffer B is much bigger than buffer A. Thus, the code gives snprintf permission to overrun buffer A, up to the length of buffer B. The fix is to change the argument to sizeof so that it computes the size of the buffer actually passed to snprintf. The attached patch does that.
+ 06 Jun 2010; Samuli Suominen <ssuominen@gentoo.org> + altermime-0.3.10.ebuild, + +files/altermime-0.3.10-MIME_headers-overflow.patch: + Fix building with _FORTIFY_SOURCE=2 wrt #320785 by Kevin Pyle. *** Bug 323071 has been marked as a duplicate of this bug. *** |