mirror of
https://github.com/OISF/suricata.git
synced 2026-10-12 02:07:10 +00:00
datasets: fix compile warnings
datasets-string.c:53:20: error: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Werror,-Wshorten-64-to-32]
return len + 2;
~~~~~~ ~~~~^~~
1 error generated.
This commit is contained in:
@@ -50,7 +50,7 @@ int StringAsBase64(const void *s, char *out, size_t out_size)
|
||||
unsigned long len = SCBase64EncodeBufferSize(str->len);
|
||||
if (len + 2 > out_size) {
|
||||
// linefeed and final zero : signal we need more space
|
||||
return len + 2;
|
||||
return (int)len + 2;
|
||||
}
|
||||
if (SCBase64Encode((unsigned char *)str->ptr, str->len, (uint8_t *)out, &len) != SC_BASE64_OK)
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user