I'm sure that should have been buf0len.
authorgraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Thu, 19 Nov 2009 00:13:41 +0000 (00:13 +0000)
committergraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Thu, 19 Nov 2009 00:13:41 +0000 (00:13 +0000)
git-svn-id: http://opkg.googlecode.com/svn/trunk@334 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

libopkg/pkg_parse.c

index a51a3e10d0ac1a583481a674261f4c9a12c8f2b8..d01dff51dcd192d95dc5def0ca5c4aa32599279b 100644 (file)
@@ -319,7 +319,7 @@ pkg_parse_from_stream_nomalloc(pkg_t *pkg, FILE *fp, uint mask,
                                fprintf(stderr, "%s: fgets: %s\n",
                                        __FUNCTION__, strerror(errno));
                                ret = -1;
-                       } else if (strlen(*buf0) == buflen-1) {
+                       } else if (strlen(*buf0) == buf0len-1) {
                                fprintf(stderr, "%s: missing new line character"
                                                " at end of file!\n",
                                        __FUNCTION__);