summaryrefslogtreecommitdiff
path: root/epan/crypt
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-07-14 11:36:10 -0700
committerGuy Harris <guy@alum.mit.edu>2015-07-14 18:36:48 +0000
commit9230834fbe06f893bd581ab889b94122df5a9998 (patch)
tree04db9bd8e497a4919fac52634941e956faf3ed92 /epan/crypt
parentcdeae7e72b749cdd68207d6e97dafb67783e2de4 (diff)
downloadwireshark-9230834fbe06f893bd581ab889b94122df5a9998.tar.gz
Don't copy zero bytes of data.
memcpy(NULL, NULL, 0) isn't guaranteed by ISO C90 to work, so don't do it. Check whether the length is zero, and don't copy if it is. (If the count is non-zero and the pointer is null, that's an error, and we should fail there, so base the test on the length, not the pointer.) Change-Id: I0b3dc1541b52670d8fef459754c9494cfcc59e5d Reviewed-on: https://code.wireshark.org/review/9633 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/crypt')
0 files changed, 0 insertions, 0 deletions