Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 249367 Details for
Bug 338619
media-video/avidemux _FORTIFY_SOURCE indicates presence of overflow
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch file equivalent of attachment #248877
avidemux-2.5.3-fix-fgets-fortify.patch (text/plain), 1.28 KB, created by
Kevin Pyle
on 2010-10-02 21:08:31 UTC
(
hide
)
Description:
Patch file equivalent of attachment #248877
Filename:
MIME Type:
Creator:
Kevin Pyle
Created:
2010-10-02 21:08:31 UTC
Size:
1.28 KB
patch
obsolete
>Switch calls of fgets from using magic numbers to using sizeof() to >ensure that the size passed to fgets is consistent with the size >allocated by the compiler. > >diff -ru a/plugins/ADM_videoFilters/Srt/ADM_vidSRTload.cpp b/plugins/ADM_videoFilters/Srt/ADM_vidSRTload.cpp >--- a/plugins/ADM_videoFilters/Srt/ADM_vidSRTload.cpp 2009-12-19 20:41:13.000000000 +0000 >+++ b/plugins/ADM_videoFilters/Srt/ADM_vidSRTload.cpp 2010-10-02 21:02:59.000000000 +0000 >@@ -86,7 +86,7 @@ > return 0; > > } >- while (fgets (string, 200, _fd)) >+ while (fgets (string, sizeof(string), _fd)) > { > _line++; > } >@@ -104,7 +104,7 @@ > // > for (uint32_t i = 0; i < _line; i++) > { >- fgets (string, ADM_RAW, _fd); >+ fgets (string, sizeof(string), _fd); > //printf("\n in : %s ",string); > if (string[0] != '{') > continue; >@@ -250,7 +250,7 @@ > // first cound how many line > line = 0; > _line = 0; >- while (fgets (string, 300, _fd)) >+ while (fgets (string, sizeof(string), _fd)) > line++; > printf ("\n subs : %ld lines\n", line); > // rewind >@@ -272,7 +272,7 @@ > for (uint32_t i = 0; i < line; i++) > { > current=&_subs[_line]; >- fgets (string, ADM_RAW, _fd); >+ fgets (string, sizeof(string), _fd); > ADM_utfConv(final,string,strlen(string),&finallen); > // Purge cr/lf > switch (state)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 338619
:
248566
|
248877
| 249367