| ... | ... | @@ -204,7 +204,7 @@ pub const Address = extern union { |
| 204 | 204 | var abbrv = false; |
| 205 | 205 | |
| 206 | 206 | var scope_id = false; |
| 207 | | var scope_id_value: [16]u8 = undefined; |
| 207 | var scope_id_value: [os.IFNAMESIZE - 1]u8 = undefined; |
| 208 | 208 | var scope_id_index: usize = 0; |
| 209 | 209 | |
| 210 | 210 | for (buf) |c, i| { |
| ... | ... | @@ -215,6 +215,10 @@ pub const Address = extern union { |
| 215 | 215 | (c >= 'a' and c <= 'z') or |
| 216 | 216 | (c == '-') or (c == '.') or (c == '_') or (c == '~')) |
| 217 | 217 | { |
| 218 | if (scope_id_index >= scope_id_value.len) { |
| 219 | return error.Overflow; |
| 220 | } |
| 221 | |
| 218 | 222 | scope_id_value[scope_id_index] = c; |
| 219 | 223 | scope_id_index += 1; |
| 220 | 224 | } else { |