Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 286821 Details for
Bug 383403
chktex detects wrong file names when following \input commands
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix to the file FindErr.c, to replace an undefined call to strcpy
chktex-1.6.4-strcpy-bug.patch (text/plain), 1.05 KB, created by
Edgar Gonzàlez i Pellicer
on 2011-09-17 19:29:55 UTC
(
hide
)
Description:
Fix to the file FindErr.c, to replace an undefined call to strcpy
Filename:
MIME Type:
Creator:
Edgar Gonzàlez i Pellicer
Created:
2011-09-17 19:29:55 UTC
Size:
1.05 KB
patch
obsolete
>--- chktex-1.6.4/FindErrs.c 2007-10-20 09:10:48.000000000 +0200 >+++ chktex-1.6.4-work/FindErrs.c 2011-09-17 20:40:44.000000000 +0200 >@@ -184,6 +184,15 @@ static char *GetLTXToken(char *Src, char > #define GET_TOKEN 256 > #define GET_STRIP_TOKEN 257 > >+static void ShiftLeftOne(char *Buf) >+{ >+ char *P; >+ >+ for (P = Buf + 1; *P; ++P) >+ *(P - 1) = *P; >+ *(P - 1) = '\0'; >+} >+ > static char *GetLTXArg(char *SrcBuf, char *OrigDest, const int Until, > struct WordList *wl) > { >@@ -218,7 +227,16 @@ static char *GetLTXArg(char *SrcBuf, cha > > if (Retval && (*OrigDest == '{') && (Until == GET_STRIP_TOKEN)) > { >- strcpy(OrigDest, OrigDest + 1); >+ /* According to strcpy(3): The strings may not overlap >+ So the following call: >+ >+ strcpy(OrigDest, OrigDest + 1); >+ >+ is undefined, and it DOES produce errors in new versions >+ of glibc (checked on glibc-2.12.2). >+ >+ Call safe version. */ >+ ShiftLeftOne(OrigDest); > OrigDest[strlen(OrigDest) - 1] = 0; > } > break;
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 383403
:
286819
|
286821
|
286823
|
286825