This repository has been archived on 2026-01-16. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
aimage/aimage-3.2.0-gcc44.patch
Nicolas Chauvet 9fb24e376c Fix for gcc44
2009-03-02 12:46:37 +00:00

21 lines
916 B
Diff

diff -up aimage-3.2.0/src/aimage_os.cpp.gcc44 aimage-3.2.0/src/aimage_os.cpp
--- aimage-3.2.0/src/aimage_os.cpp.gcc44 2009-03-02 13:36:09.000000000 +0100
+++ aimage-3.2.0/src/aimage_os.cpp 2009-03-02 13:41:32.000000000 +0100
@@ -33,11 +33,15 @@ void checkline(const char *name,const ch
{
while(buf[0] && isspace(buf[0])) buf++; // advance buf to end of spaces
- char *pos = strstr(buf,name);
+ char *buf_tmp;
+ char *name_tmp;
+ strcpy(buf_tmp, buf);
+ strcpy(name_tmp, name);
+ char *pos = strstr(buf_tmp,name_tmp);
if(pos==0) return;
/* The string was found */
- char *cc = pos + strlen(name); // skip past to the end of the string
+ char *cc = pos + strlen(name_tmp); // skip past to the end of the string
while(*cc && isspace(*cc)) cc++; // scan to end of spaces
char *dd = index(cc,'\n'); // can we find a \n?
if(dd) *dd = '\000'; // yes; clear it