Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 229107 Details for
Bug 317139
[PATCH] app-arch/tar-1.2{2,3} crashes (buffer overflow) when compiled with gcc-4.5
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
patch from fedora-{12,13}
tar-1.22-fortifysourcessigabrt.patch (text/plain), 1.30 KB, created by
emil karlson
on 2010-04-25 16:14:41 UTC
(
hide
)
Description:
patch from fedora-{12,13}
Filename:
MIME Type:
Creator:
emil karlson
Created:
2010-04-25 16:14:41 UTC
Size:
1.30 KB
patch
obsolete
>diff -urNp tar-1.22-orig/src/create.c tar-1.22/src/create.c >--- tar-1.22-orig/src/create.c 2009-07-09 18:38:37.000000000 +0200 >+++ tar-1.22/src/create.c 2009-07-09 18:43:44.000000000 +0200 >@@ -578,7 +578,10 @@ write_gnu_long_link (struct tar_stat_inf > GNAME_TO_CHARS (tmpname, header->header.gname); > free (tmpname); > >- strcpy (header->header.magic, OLDGNU_MAGIC); >+ /* OLDGNU_MAGIC is string with 7 chars + NULL */ >+ strncpy (header->header.magic, OLDGNU_MAGIC, sizeof(header->header.magic)); >+ strncpy (header->header.version, OLDGNU_MAGIC+sizeof(header->header.magic), >+ sizeof(header->header.version)); > header->header.typeflag = type; > finish_header (st, header, -1); > >@@ -908,9 +911,13 @@ start_header (struct tar_stat_info *st) > break; > > case OLDGNU_FORMAT: >- case GNU_FORMAT: /*FIXME?*/ >- /* Overwrite header->header.magic and header.version in one blow. */ >- strcpy (header->header.magic, OLDGNU_MAGIC); >+ case GNU_FORMAT: >+ /* OLDGNU_MAGIC is string with 7 chars + NULL */ >+ strncpy (header->header.magic, OLDGNU_MAGIC, >+ sizeof(header->header.magic)); >+ strncpy (header->header.version, >+ OLDGNU_MAGIC+sizeof(header->header.magic), >+ sizeof(header->header.version)); > break; > > case POSIX_FORMAT:
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 Raw
Actions:
View
Attachments on
bug 317139
: 229107