diff options
author | Eric Sandeen <sandeen@redhat.com> | 2015-10-12 16:04:15 +1100 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2015-10-12 16:04:15 +1100 |
commit | 91f9f5fe1e7350e872b3fbc3194e8183bddce514 (patch) | |
tree | 5aa10aef830c70180c090d43d4cf905baf5d2f54 /lib/random32.c | |
parent | dbd5c8c9a28899c6ca719eb21afc0afba9dd5574 (diff) | |
download | op-kernel-dev-91f9f5fe1e7350e872b3fbc3194e8183bddce514.zip op-kernel-dev-91f9f5fe1e7350e872b3fbc3194e8183bddce514.tar.gz |
xfs: avoid null *src in memcpy call in xlog_write
The gcc undefined behavior sanitizer caught this; surely
any sane memcpy implementation will no-op if size == 0,
but behavior with a *src of NULL is technically undefined
(declared nonnull), so avoid it here.
We are actually in this situation frequently via
xlog_commit_record(), because:
struct xfs_log_iovec reg = {
.i_addr = NULL,
.i_len = 0,
.i_type = XLOG_REG_TYPE_COMMIT,
};
Reported-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'lib/random32.c')
0 files changed, 0 insertions, 0 deletions