diff options
author | tron <tron@pkgsrc.org> | 2005-12-14 16:53:06 +0000 |
---|---|---|
committer | tron <tron@pkgsrc.org> | 2005-12-14 16:53:06 +0000 |
commit | e5857f6a3ddef738f9ea84b855828810a46615f4 (patch) | |
tree | a178f58e976569042cb3dabfde65da9a9f3677f0 /net | |
parent | ca33769eeacc28c121da74a232f46bce546e75a8 (diff) | |
download | pkgsrc-e5857f6a3ddef738f9ea84b855828810a46615f4.tar.gz |
Use official fix for file descriptor leak from the ethereal SVN repository.
Diffstat (limited to 'net')
-rw-r--r-- | net/ethereal/distinfo | 5 | ||||
-rw-r--r-- | net/ethereal/patches/patch-ad | 30 | ||||
-rw-r--r-- | net/ethereal/patches/patch-ae | 287 |
3 files changed, 306 insertions, 16 deletions
diff --git a/net/ethereal/distinfo b/net/ethereal/distinfo index 15eac827d63..92abf3dbe9a 100644 --- a/net/ethereal/distinfo +++ b/net/ethereal/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.47 2005/12/13 23:22:27 tron Exp $ +$NetBSD: distinfo,v 1.48 2005/12/14 16:53:06 tron Exp $ SHA1 (ethereal-0.10.13.tar.bz2) = 4ed2014a1ede6bdb05fbe99b0469a030c7794a13 RMD160 (ethereal-0.10.13.tar.bz2) = 54f6431ac2d807e0d7dd896af71463d340c66107 @@ -6,4 +6,5 @@ Size (ethereal-0.10.13.tar.bz2) = 8029087 bytes SHA1 (patch-aa) = 0513b971c0af032fc64fc181fbd64d78aef0d044 SHA1 (patch-ab) = bfbefb0ae66607068e21d0912a15a72606ab8ea8 SHA1 (patch-ac) = 101cbc6315b2ad9732b70d697295ad8e4a389dcd -SHA1 (patch-ad) = a7678d74599af94c8888a226f5ee012a11616c0e +SHA1 (patch-ad) = 7024e51dbcfd9e68e78541c549e3b4a44edf0870 +SHA1 (patch-ae) = 23cd8b2dab8c84137fbcf2018dd3416dcdcc56a5 diff --git a/net/ethereal/patches/patch-ad b/net/ethereal/patches/patch-ad index 63688ab75df..fdc53122231 100644 --- a/net/ethereal/patches/patch-ad +++ b/net/ethereal/patches/patch-ad @@ -1,20 +1,22 @@ ---- epan/radius_dict.c.orig 2005-10-19 17:23:28.000000000 +0100 -+++ epan/radius_dict.c 2005-12-13 23:10:30.000000000 +0000 -@@ -1181,6 +1181,8 @@ - - fullpaths[include_stack_ptr] = g_strdup_printf("%s%c%s",directory,DIR_SEPARATOR,yytext); +$NetBSD: patch-ad,v 1.4 2005/12/14 16:53:06 tron Exp $ + +--- epan/radius_dict.l.orig 2005-10-10 14:23:08.000000000 +0100 ++++ epan/radius_dict.l 2005-12-14 14:09:32.000000000 +0000 +@@ -192,6 +192,8 @@ -+ if (yyin != NULL) -+ (void) fclose(yyin); - yyin = fopen( fullpaths[include_stack_ptr], "r" ); + <<EOF>> { - if (!yyin) { -@@ -2286,6 +2288,8 @@ - BEGIN OUT; ++ fclose(yyin); ++ + if ( --include_stack_ptr < 0 ) { + yyterminate(); + } else { +@@ -375,6 +377,8 @@ yylex(); -+ (void) fclose(yyin); -+ yyin = NULL; - + ++ fclose(yyin); ++ for (i=0; i < 10; i++) { if (fullpaths[i]) g_free(fullpaths[i]); + } diff --git a/net/ethereal/patches/patch-ae b/net/ethereal/patches/patch-ae new file mode 100644 index 00000000000..4d0e849ff38 --- /dev/null +++ b/net/ethereal/patches/patch-ae @@ -0,0 +1,287 @@ +$NetBSD: patch-ae,v 1.3 2005/12/14 16:53:06 tron Exp $ + +--- epan/radius_dict.c.orig 2005-10-19 17:23:28.000000000 +0100 ++++ epan/radius_dict.c 2005-12-14 14:59:01.000000000 +0000 +@@ -27,7 +27,6 @@ + #define YY_FLEX_MINOR_VERSION 5 + + #include <stdio.h> +-#include <unistd.h> + + + /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ +@@ -41,6 +40,7 @@ + #ifdef __cplusplus + + #include <stdlib.h> ++#include <unistd.h> + + /* Use prototypes in function declarations. */ + #define YY_USE_PROTOS +@@ -255,11 +255,7 @@ + + YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); + YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); +-YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); +- +-static void *yy_flex_alloc YY_PROTO(( yy_size_t )); +-static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); +-static void yy_flex_free YY_PROTO(( void * )); ++YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, yy_size_t len )); + + #define yy_new_buffer yy_create_buffer + +@@ -288,6 +284,14 @@ + extern char *yytext; + #define yytext_ptr yytext + ++static void *yy_flex_alloc YY_PROTO(( yy_size_t )); ++static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) ++#ifdef __GNUC__ ++ __attribute__((__unused__)) ++#endif ++; ++static void yy_flex_free YY_PROTO(( void * )); ++ + static yy_state_type yy_get_previous_state YY_PROTO(( void )); + static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); + static int yy_get_next_buffer YY_PROTO(( void )); +@@ -709,7 +713,7 @@ + #define BEGIN_VENDOR 14 + #define END_VENDOR 15 + +-#line 713 "radius_dict.c" ++#line 717 "radius_dict.c" + + /* Macros after this point can all be overridden by user definitions in + * section 1. +@@ -724,15 +728,19 @@ + #endif + + #ifndef YY_NO_UNPUT +-static void yyunput YY_PROTO(( int c, char *buf_ptr )); ++static void yyunput YY_PROTO(( int c, char *buf_ptr )) ++#ifdef __GNUC__ ++ __attribute__((__unused__)) ++#endif ++; + #endif + + #ifndef yytext_ptr +-static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); ++static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, yy_size_t )); + #endif + + #ifdef YY_NEED_STRLEN +-static int yy_flex_strlen YY_PROTO(( yyconst char * )); ++static yy_size_t yy_flex_strlen YY_PROTO(( yyconst char * )); + #endif + + #ifndef YY_NO_INPUT +@@ -789,7 +797,7 @@ + /* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +-#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) ++#define ECHO (void) fwrite( yytext, (size_t)yyleng, 1, yyout ) + #endif + + /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, +@@ -809,7 +817,7 @@ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ +- else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ ++ else if ( ((result = fread( buf, 1, (size_t)max_size, yyin )) == 0) \ + && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); + #endif +@@ -848,7 +856,7 @@ + + /* Code executed at the end of each rule. */ + #ifndef YY_BREAK +-#define YY_BREAK break; ++#define YY_BREAK /*LINTED*/break; + #endif + + #define YY_RULE_SETUP \ +@@ -857,13 +865,18 @@ + YY_DECL + { + register yy_state_type yy_current_state; +- register char *yy_cp = NULL, *yy_bp = NULL; ++ register char *yy_cp, *yy_bp; + register int yy_act; + + #line 80 "radius_dict.l" + +-#line 866 "radius_dict.c" ++#line 874 "radius_dict.c" + ++#if defined(YY_USES_REJECT) && (defined(__GNUC__) || defined(lint)) ++ /* XXX: shut up `unused label' warning with %options yylineno */ ++ if (/*CONSTCOND*/0 && yy_full_match) ++ goto find_rule; ++#endif + if ( yy_init ) + { + yy_init = 0; +@@ -888,7 +901,7 @@ + yy_load_buffer_state(); + } + +- while ( 1 ) /* loops until end-of-file is reached */ ++ while (/*CONSTCOND*/ 1 ) /* loops until end-of-file is reached */ + { + yy_cp = yy_c_buf_p; + +@@ -1216,6 +1229,8 @@ + #line 193 "radius_dict.l" + { + ++ fclose(yyin); ++ + if ( --include_stack_ptr < 0 ) { + yyterminate(); + } else { +@@ -1231,15 +1246,15 @@ + YY_BREAK + case 38: + YY_RULE_SETUP +-#line 208 "radius_dict.l" ++#line 210 "radius_dict.l" + { linenums[include_stack_ptr]++; BEGIN OUT; } + YY_BREAK + case 39: + YY_RULE_SETUP +-#line 211 "radius_dict.l" ++#line 213 "radius_dict.l" + ECHO; + YY_BREAK +-#line 1243 "radius_dict.c" ++#line 1258 "radius_dict.c" + + case YY_END_OF_BUFFER: + { +@@ -1619,7 +1634,6 @@ + #endif /* ifndef YY_NO_UNPUT */ + + +-#ifndef YY_NO_INPUT + #ifdef __cplusplus + static int yyinput() + #else +@@ -1661,7 +1675,7 @@ + /* Reset buffer status. */ + yyrestart( yyin ); + +- /* fall through */ ++ /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { +@@ -1691,7 +1705,7 @@ + + return c; + } +-#endif /* YY_NO_INPUT */ ++ + + #ifdef YY_USE_PROTOS + void yyrestart( FILE *input_file ) +@@ -1802,6 +1816,11 @@ + } + + ++#ifndef YY_ALWAYS_INTERACTIVE ++#ifndef YY_NEVER_INTERACTIVE ++#include <unistd.h> ++#endif ++#endif + + #ifdef YY_USE_PROTOS + void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) +@@ -1906,7 +1925,7 @@ + yyconst char *yy_str; + #endif + { +- int len; ++ yy_size_t len; + for ( len = 0; yy_str[len]; ++len ) + ; + +@@ -1917,17 +1936,16 @@ + + #ifndef YY_NO_SCAN_BYTES + #ifdef YY_USE_PROTOS +-YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) ++YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, yy_size_t len ) + #else + YY_BUFFER_STATE yy_scan_bytes( bytes, len ) + yyconst char *bytes; +-int len; ++yy_size_t len; + #endif + { + YY_BUFFER_STATE b; + char *buf; +- yy_size_t n; +- int i; ++ yy_size_t n, i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = len + 2; +@@ -2043,15 +2061,15 @@ + + #ifndef yytext_ptr + #ifdef YY_USE_PROTOS +-static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) ++static void yy_flex_strncpy( char *s1, yyconst char *s2, yy_size_t n ) + #else + static void yy_flex_strncpy( s1, s2, n ) + char *s1; + yyconst char *s2; +-int n; ++yy_size_t n; + #endif + { +- register int i; ++ register yy_size_t i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; + } +@@ -2059,13 +2077,13 @@ + + #ifdef YY_NEED_STRLEN + #ifdef YY_USE_PROTOS +-static int yy_flex_strlen( yyconst char *s ) ++static yy_size_t yy_flex_strlen( yyconst char *s ) + #else +-static int yy_flex_strlen( s ) ++static yy_size_t yy_flex_strlen( s ) + yyconst char *s; + #endif + { +- register int n; ++ register yy_size_t n; + for ( n = 0; s[n]; ++n ) + ; + +@@ -2119,7 +2137,7 @@ + return 0; + } + #endif +-#line 211 "radius_dict.l" ++#line 213 "radius_dict.l" + + + void add_vendor(const gchar* name, guint32 vendor_id) { +@@ -2287,6 +2305,8 @@ + + yylex(); + ++ fclose(yyin); ++ + for (i=0; i < 10; i++) { + if (fullpaths[i]) g_free(fullpaths[i]); + } |