summaryrefslogtreecommitdiff
path: root/packages/gpe-conf/files/fixsegfault.patch
diff options
context:
space:
mode:
authorFlorian Boor <florian.boor@kernelconcepts.de>2006-02-20 21:23:34 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-02-20 21:23:34 +0000
commitfedb098e475aa7f95353d14aaa57b13d3e5151b3 (patch)
treea5a431cd46bb30b8e3fee8a41410714c1ff151ff /packages/gpe-conf/files/fixsegfault.patch
parentf1cad3f16f18fc1d70b20b5955a4be116489addf (diff)
gpe-conf: Add patch to fix segfault in 0.1.30.
Diffstat (limited to 'packages/gpe-conf/files/fixsegfault.patch')
-rw-r--r--packages/gpe-conf/files/fixsegfault.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/packages/gpe-conf/files/fixsegfault.patch b/packages/gpe-conf/files/fixsegfault.patch
new file mode 100644
index 0000000000..7f1ccbe432
--- /dev/null
+++ b/packages/gpe-conf/files/fixsegfault.patch
@@ -0,0 +1,44 @@
+Index: network.c
+===================================================================
+RCS file: /cvs/gpe/base/gpe-conf/network.c,v
+retrieving revision 1.55.2.2
+retrieving revision 1.55.2.3
+diff -u -r1.55.2.2 -r1.55.2.3
+--- network.c 16 Feb 2006 22:32:30 -0000 1.55.2.2
++++ network.c 20 Feb 2006 01:34:44 -0000 1.55.2.3
+@@ -289,19 +289,23 @@
+ i = iflen-1;
+
+ fd = fopen(_PATH_PROCNET_WIRELESS, "r");
+- fgets(buffer, 256, fd); // chuck first two lines;
+- fgets(buffer, 256, fd);
+- while (!feof(fd)) {
+- if (fgets(buffer, 256, fd) == NULL)
+- break;
+- name = buffer;
+- sep = strrchr(buffer, ':');
+- if (sep) *sep = 0;
+- while(*name == ' ') name++;
+- if (!strcmp(name, ifname))
+- iflist[iflen - 1].iswireless = TRUE;
+- }
++ if (fd != NULL)
++ {
++ fgets(buffer, 256, fd); // chuck first two lines;
++ fgets(buffer, 256, fd);
++ while (!feof(fd))
++ {
++ if (fgets(buffer, 256, fd) == NULL)
++ break;
++ name = buffer;
++ sep = strrchr(buffer, ':');
++ if (sep) *sep = 0;
++ while(*name == ' ') name++;
++ if (!strcmp(name, ifname))
++ iflist[iflen - 1].iswireless = TRUE;
++ }
+ fclose(fd);
++ }
+ }
+ else
+ i = existing;