From: Felix Fietkau Date: Tue, 11 Apr 2006 13:54:43 +0000 (+0000) Subject: fix segfault in locking utility X-Git-Tag: whiterussian_rc6~276 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=856e90359371b400adae736215c37317d518ef8e;p=openwrt%2Fsvn-archive%2Fopenwrt.git fix segfault in locking utility SVN-Revision: 3617 --- diff --git a/openwrt/package/busybox/patches/340-lock_util.patch b/openwrt/package/busybox/patches/340-lock_util.patch index de510551c0..9e2075da17 100644 --- a/openwrt/package/busybox/patches/340-lock_util.patch +++ b/openwrt/package/busybox/patches/340-lock_util.patch @@ -41,7 +41,7 @@ diff -urN busybox.old/miscutils/Makefile.in busybox.dev/miscutils/Makefile.in diff -urN busybox.old/miscutils/lock.c busybox.dev/miscutils/lock.c --- busybox.old/miscutils/lock.c 1970-01-01 01:00:00.000000000 +0100 +++ busybox.dev/miscutils/lock.c 2006-03-14 09:50:40.000000000 +0100 -@@ -0,0 +1,125 @@ +@@ -0,0 +1,128 @@ +#include +#include +#include @@ -79,10 +79,13 @@ diff -urN busybox.old/miscutils/lock.c busybox.dev/miscutils/lock.c + FILE *f; + int i; + -+ f = fopen(file, "r"); ++ if ((f = fopen(file, "r")) == NULL) ++ return 0; ++ + fscanf(f, "%d", &i); + if (i > 0) + kill(i, SIGTERM); ++ + fclose(f); + + return 0;