Changeset 3617


Ignore:
Timestamp:
2006-04-11T15:54:43+02:00 (12 years ago)
Author:
nbd
Message:

fix segfault in locking utility

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/whiterussian/openwrt/package/busybox/patches/340-lock_util.patch

    r3451 r3617  
    4242--- busybox.old/miscutils/lock.c        1970-01-01 01:00:00.000000000 +0100 
    4343+++ busybox.dev/miscutils/lock.c        2006-03-14 09:50:40.000000000 +0100 
    44 @@ -0,0 +1,125 @@ 
     44@@ -0,0 +1,128 @@ 
    4545+#include <sys/types.h> 
    4646+#include <sys/file.h> 
     
    8080+       int i; 
    8181+        
    82 +       f = fopen(file, "r"); 
     82+       if ((f = fopen(file, "r")) == NULL) 
     83+               return 0; 
     84+        
    8385+       fscanf(f, "%d", &i); 
    8486+       if (i > 0) 
    8587+               kill(i, SIGTERM); 
     88+        
    8689+       fclose(f); 
    8790+ 
  • trunk/openwrt/package/busybox/patches/340-lock_util.patch

    r3588 r3617  
    4040--- busybox.old/miscutils/lock.c        1970-01-01 01:00:00.000000000 +0100 
    4141+++ busybox.dev/miscutils/lock.c        2006-04-05 01:07:12.000000000 +0200 
    42 @@ -0,0 +1,125 @@ 
     42@@ -0,0 +1,128 @@ 
    4343+#include <sys/types.h> 
    4444+#include <sys/file.h> 
     
    7878+       int i; 
    7979+        
    80 +       f = fopen(file, "r"); 
     80+       if ((f = fopen(file, "r")) == NULL) 
     81+               return 0; 
     82+        
    8183+       fscanf(f, "%d", &i); 
    8284+       if (i > 0) 
    8385+               kill(i, SIGTERM); 
     86+        
    8487+       fclose(f); 
    8588+ 
Note: See TracChangeset for help on using the changeset viewer.