fix for bug in include parsing from Jim Paris
authorBdale Garbee <bdale@gag.com>
Thu, 12 Jan 2012 01:06:45 +0000 (18:06 -0700)
committerBdale Garbee <bdale@gag.com>
Thu, 12 Jan 2012 01:06:45 +0000 (18:06 -0700)
debian/changelog
debian/patches/as31-fix-duplicate-line.patch [new file with mode: 0644]
debian/patches/series

index d523b9ee651c2d5130a5029f679f45dc04bd8851..d02fdec87507104b70852e7513aa6b87b19b055a 100644 (file)
@@ -1,3 +1,9 @@
+as31 (2.3.1-6) UNRELEASED; urgency=low
+
+  * patch from Jim Paris for issue in include parsing, closes: #655533
+
+ -- Bdale Garbee <bdale@gag.com>  Wed, 11 Jan 2012 18:06:31 -0700
+
 as31 (2.3.1-5) unstable; urgency=low
 
   * force regeneration of stale upstream parser.c to resolve "location
diff --git a/debian/patches/as31-fix-duplicate-line.patch b/debian/patches/as31-fix-duplicate-line.patch
new file mode 100644 (file)
index 0000000..e5a6064
--- /dev/null
@@ -0,0 +1,22 @@
+--- as31-2.3.1-orig/as31/run.c 2012-01-11 19:29:35.000000000 -0500
++++ as31-2.3.1/as31/run.c      2012-01-11 19:31:56.000000000 -0500
+@@ -106,7 +106,8 @@
+       }
+       while (!feof(finPre)) {
+-              getline(&lineBuffer,&sizeBuf,finPre);
++              if (getline(&lineBuffer,&sizeBuf,finPre) == -1)
++                      break;
+               if ((includePtr=strstr(lineBuffer,INC_CMD))) {
+                       includePtr=includePtr+strlen(INC_CMD);
+                       while ((*includePtr==' ')||             //move includePtr to filename
+@@ -131,7 +132,8 @@
+                               mesg_f("Cannot open include file: %s\n",includePtr);
+                       } else {
+                               while (!feof(includeFile)) {
+-                                      getline(&incLineBuffer,&incSizeBuf,includeFile);
++                                      if (getline(&incLineBuffer,&incSizeBuf,includeFile) == -1)
++                                              break;
+                                       fprintf(fin,"%s",incLineBuffer);
+                                       if (strlen(incLineBuffer)) {
+                                               incLineCount++;
index a3a6c63b215a3fc7e1b45535e1df39a6096a93af..594f70a30c2aced284a6356712f4668d8b620575 100644 (file)
@@ -1,3 +1,4 @@
 elide_errant_text
 regenerate_parser.c
 as31-mkstemps.patch
+as31-fix-duplicate-line.patch