1- $NetBSD : patch - libopenarc_arc .c ,v 1.1 2023 / 04 / 21 00 : 49 : 56 manu Exp $
1+ $NetBSD : patch - libopenarc_arc .c ,v 1.2 2025 / 06 / 16 16 : 17 : 05 ryoon Exp $
22
33Fix buffer overrun
44
55From upstream
66https ://github.com/trusteddomainproject/OpenARC/pull/117
77
8- -- - libopenarc /arc .c .orig 2021 - 03 - 30 15 :33 :39.683325974 + 0200
9- ++ + libopenarc /arc .c 2021 - 03 - 30 15 :34 :50.693955186 + 0200
10- @@ -2329 ,8 + 2329 ,12 @@
11-
8+ -- - libopenarc /arc .c .orig 2018 - 09 - 21 15 :51 :23.000000000 + 0000
9+ ++ + libopenarc /arc .c
10+ @@ -1664 ,8 + 1664 ,7 @@ arc_process_set (ARC_MESSAGE * msg , arc_kv
11+ arc_param_get (set , (u_char * ) "b" ) == NULL ||
12+ arc_param_get (set , (u_char * ) "s" ) == NULL ||
13+ arc_param_get (set , (u_char * ) "d" ) == NULL ||
14+ - arc_param_get (set , (u_char * ) "a" ) == NULL ||
15+ - arc_param_get (set , (u_char * ) "t" ) == NULL )
16+ + arc_param_get (set , (u_char * ) "a" ) == NULL )
17+ {
18+ arc_error (msg , "missing parameter(s) in %s data" ,
19+ settype );
20+ @@ -2330 ,6 + 2329 ,10 @@ arc_parse_header_field (ARC_MESSAGE * msg ,
1221 while (end > hdr && isascii (* (end - 1 )) && isspace (* (end - 1 )))
1322 end -- ;
1423
@@ -19,14 +28,11 @@ From upstream
1928 /* don't allow a field name containing a semicolon */
2029 semicolon = memchr (hdr , ';' , hlen );
2130 if (semicolon != NULL && colon != NULL && semicolon < colon )
22- return ARC_STAT_SYNTAX ;
23- @@ -2676 ,8 + 2680 ,9 @@
24-
31+ @@ -2677 ,6 + 2680 ,7 @@ arc_eoh (ARC_MESSAGE * msg )
2532 for (h = msg -> arc_hhead ; h != NULL ; h = h -> hdr_next )
2633 {
2734 char hnbuf [ARC_MAXHEADER + 1 ];
2835+ assert (h -> hdr_namelen <= ARC_MAXHEADER );
2936
3037 memset (hnbuf , '\0' , sizeof hnbuf );
3138 strncpy (hnbuf , h -> hdr_text , h -> hdr_namelen );
32- if (strcasecmp (hnbuf , ARC_AR_HDRNAME ) == 0 ||
0 commit comments