Blame aimage-3.2.0-gcc44.patch

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