mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Zero out bytes by default for consistent return value on error
This commit is contained in:
parent
45ab85c09e
commit
a2320ffe88
2 changed files with 2 additions and 2 deletions
|
@ -2731,7 +2731,7 @@ function raw_bytes_to_v4_addr%(b: string%): addr
|
||||||
## .. zeek:see:: raw_bytes_to_v6_addr to_addr to_subnet
|
## .. zeek:see:: raw_bytes_to_v6_addr to_addr to_subnet
|
||||||
function raw_bytes_to_v6_addr%(x: string%): addr
|
function raw_bytes_to_v6_addr%(x: string%): addr
|
||||||
%{
|
%{
|
||||||
uint32_t bytes[4];
|
uint32_t bytes[4] = {0, 0, 0, 0};
|
||||||
|
|
||||||
if ( x->Len() < 16 )
|
if ( x->Len() < 16 )
|
||||||
zeek::emit_builtin_error("too short a string as input to raw_bytes_to_v6_addr()");
|
zeek::emit_builtin_error("too short a string as input to raw_bytes_to_v6_addr()");
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||||
4142:4344:4546:4748:494b:4c4d:4e4f:5051
|
4142:4344:4546:4748:494b:4c4d:4e4f:5051
|
||||||
2852:8180:ff7f:0:2700::
|
::
|
||||||
dada:beef::4e5e:cff:fe6a:8671
|
dada:beef::4e5e:cff:fe6a:8671
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue