diff options
author | Lance Richardson <lrichard@redhat.com> | 2017-06-13 12:57:38 -0400 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-06-13 10:01:11 -0700 |
commit | 316d0932469eaf6ced323b134581c7ec66e960f6 (patch) | |
tree | 426228e4f43ad9c24dff299bfd9d9e77ee1d5fe1 /lib/util.c | |
parent | ca1cb3010ae66534b85d0be66c692c5808041ea6 (diff) | |
download | openvswitch-316d0932469eaf6ced323b134581c7ec66e960f6.tar.gz |
treewide: Avoid undefined behavior passing null in nonnull parameters.
Eliminate a number of instances of undefined behavior related to
passing NULL in parameters having "nonnull" annotations.
Found with gcc's undefined behavior sanitizer.
Signed-off-by: Lance Richardson <lrichard@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'lib/util.c')
-rw-r--r-- | lib/util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/util.c b/lib/util.c index b2a1f8ad0..85b935045 100644 --- a/lib/util.c +++ b/lib/util.c @@ -132,7 +132,7 @@ void * xmemdup(const void *p_, size_t size) { void *p = xmalloc(size); - memcpy(p, p_, size); + nullable_memcpy(p, p_, size); return p; } |