diff options
Diffstat (limited to 'recipes-extended/rxtx/files/fhs_lock_buffer_overflow_fix.patch')
-rw-r--r-- | recipes-extended/rxtx/files/fhs_lock_buffer_overflow_fix.patch | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/recipes-extended/rxtx/files/fhs_lock_buffer_overflow_fix.patch b/recipes-extended/rxtx/files/fhs_lock_buffer_overflow_fix.patch new file mode 100644 index 0000000..c4d0e89 --- /dev/null +++ b/recipes-extended/rxtx/files/fhs_lock_buffer_overflow_fix.patch | |||
@@ -0,0 +1,66 @@ | |||
1 | Description: Java fails with a buffer overflow when there's a locked serial | ||
2 | device, see http://mailman.qbang.org/pipermail/rxtx/2009-May/10897125.html. | ||
3 | Author: Sergio Talens-Oliag <sto@debian.org> | ||
4 | Upstream-Status: Pending | ||
5 | |||
6 | Index: rxtx-2.2pre2/CNI/SerialImp.c | ||
7 | =================================================================== | ||
8 | --- rxtx-2.2pre2.orig/CNI/SerialImp.c 2012-05-21 13:13:43.000000000 +0200 | ||
9 | +++ rxtx-2.2pre2/CNI/SerialImp.c 2012-05-21 13:24:05.876652630 +0200 | ||
10 | @@ -4752,7 +4752,7 @@ | ||
11 | fd = open( file, O_CREAT | O_WRONLY | O_EXCL, 0444 ); | ||
12 | if( fd < 0 ) | ||
13 | { | ||
14 | - sprintf( message, | ||
15 | + snprintf( message, 79, | ||
16 | "RXTX fhs_lock() Error: creating lock file: %s: %s\n", | ||
17 | file, strerror(errno) ); | ||
18 | report_error( message ); | ||
19 | Index: rxtx-2.2pre2/src/SerialImp.c | ||
20 | =================================================================== | ||
21 | --- rxtx-2.2pre2.orig/src/SerialImp.c 2012-05-21 13:13:43.000000000 +0200 | ||
22 | +++ rxtx-2.2pre2/src/SerialImp.c 2012-05-21 13:26:50.184644233 +0200 | ||
23 | @@ -5307,7 +5307,7 @@ | ||
24 | } | ||
25 | if ( dev_lock( filename ) ) | ||
26 | { | ||
27 | - sprintf( message, | ||
28 | + snprintf( message, 79, | ||
29 | "RXTX fhs_lock() Error: creating lock file for: %s: %s\n", | ||
30 | filename, strerror(errno) ); | ||
31 | report_error( message ); | ||
32 | @@ -5367,7 +5367,7 @@ | ||
33 | fd = open( file, O_CREAT | O_WRONLY | O_EXCL, 0444 ); | ||
34 | if( fd < 0 ) | ||
35 | { | ||
36 | - sprintf( message, | ||
37 | + snprintf( message, 79, | ||
38 | "RXTX fhs_lock() Error: creating lock file: %s: %s\n", | ||
39 | file, strerror(errno) ); | ||
40 | report_error( message ); | ||
41 | Index: rxtx-2.2pre2/src/lfd/lockdaemon.c | ||
42 | =================================================================== | ||
43 | --- rxtx-2.2pre2.orig/src/lfd/lockdaemon.c 2007-04-26 07:26:07.000000000 +0200 | ||
44 | +++ rxtx-2.2pre2/src/lfd/lockdaemon.c 2012-05-21 13:25:35.396648055 +0200 | ||
45 | @@ -145,7 +145,7 @@ | ||
46 | fd = open( file, O_CREAT | O_WRONLY | O_EXCL, 0444 ); | ||
47 | if( fd < 0 ) | ||
48 | { | ||
49 | - sprintf( message, | ||
50 | + snprintf( message, 79, | ||
51 | "RXTX fhs_lock() Error: creating lock file: %s: %s\n", | ||
52 | file, strerror(errno) ); | ||
53 | syslog( LOG_INFO, message ); | ||
54 | Index: rxtx-2.2pre2/src/lfd/lockdaemon.c.noinetd | ||
55 | =================================================================== | ||
56 | --- rxtx-2.2pre2.orig/src/lfd/lockdaemon.c.noinetd 2007-04-26 07:26:07.000000000 +0200 | ||
57 | +++ rxtx-2.2pre2/src/lfd/lockdaemon.c.noinetd 2012-05-21 13:25:55.748647017 +0200 | ||
58 | @@ -144,7 +144,7 @@ | ||
59 | fd = open( file, O_CREAT | O_WRONLY | O_EXCL, 0444 ); | ||
60 | if( fd < 0 ) | ||
61 | { | ||
62 | - sprintf( message, | ||
63 | + snprintf( message, 79, | ||
64 | "RXTX fhs_lock() Error: creating lock file: %s: %s\n", | ||
65 | file, strerror(errno) ); | ||
66 | syslog( LOG_INFO, message ); | ||