forked from osmocom/wireshark
Squelch a warning from VS Code Analysis.
It warns that a 32-bit value is being shifted left and then converted to a 64-bit type; presumably it means "this might overflow and not give you the result you expect". That's unlikely to be the case here, as few UN*X file systems have a recommended I/O block size > 2^30, but we might as well throw in a cast so the convert-to-a-64-bit-type is done first. Change-Id: Id6ab11d750d5cf4cc03d060d63edc01b66cd179d Reviewed-on: https://code.wireshark.org/review/20352 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
300f474737
commit
a9ec1e41b1
|
@ -813,8 +813,8 @@ file_fdopen(int fd)
|
|||
#endif
|
||||
|
||||
/* allocate buffers */
|
||||
state->in = (unsigned char *)g_try_malloc(want);
|
||||
state->out = (unsigned char *)g_try_malloc(want << 1);
|
||||
state->in = (unsigned char *)g_try_malloc((gsize)want);
|
||||
state->out = (unsigned char *)g_try_malloc(((gsize)want) << 1);
|
||||
state->size = want;
|
||||
if (state->in == NULL || state->out == NULL) {
|
||||
g_free(state->out);
|
||||
|
|
Loading…
Reference in New Issue