print-pppoe.c (242485) | print-pppoe.c (252283) |
---|---|
1/* 2 * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that: (1) source code distributions 7 * retain the above copyright notice and this paragraph in its entirety, (2) 8 * distributions including binary code include the above copyright notice and --- 145 unchanged lines hidden (view full) --- 154 TCHECK2(*p, 4); 155 tag_type = EXTRACT_16BITS(p); 156 tag_len = EXTRACT_16BITS(p + 2); 157 p += 4; 158 /* p points to tag_value */ 159 160 if (tag_len) { 161 unsigned isascii = 0, isgarbage = 0; | 1/* 2 * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that: (1) source code distributions 7 * retain the above copyright notice and this paragraph in its entirety, (2) 8 * distributions including binary code include the above copyright notice and --- 145 unchanged lines hidden (view full) --- 154 TCHECK2(*p, 4); 155 tag_type = EXTRACT_16BITS(p); 156 tag_len = EXTRACT_16BITS(p + 2); 157 p += 4; 158 /* p points to tag_value */ 159 160 if (tag_len) { 161 unsigned isascii = 0, isgarbage = 0; |
162 const u_char *v = p; | 162 const u_char *v; |
163 char tag_str[MAXTAGPRINT]; 164 unsigned tag_str_len = 0; 165 166 /* TODO print UTF-8 decoded text */ 167 TCHECK2(*p, tag_len); 168 for (v = p; v < p + tag_len && tag_str_len < MAXTAGPRINT-1; v++) 169 if (*v >= 32 && *v < 127) { 170 tag_str[tag_str_len++] = *v; --- 41 unchanged lines hidden --- | 163 char tag_str[MAXTAGPRINT]; 164 unsigned tag_str_len = 0; 165 166 /* TODO print UTF-8 decoded text */ 167 TCHECK2(*p, tag_len); 168 for (v = p; v < p + tag_len && tag_str_len < MAXTAGPRINT-1; v++) 169 if (*v >= 32 && *v < 127) { 170 tag_str[tag_str_len++] = *v; --- 41 unchanged lines hidden --- |