Skip to content

Commit

Permalink
ubsan-dont-handle-misaligned-address-when-support-unaligned-access-v2
Browse files Browse the repository at this point in the history
add braces around if block

Cc: David Laight <[email protected]>
Cc: Andrey Ryabinin <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
dingtianhong authored and hnaz committed Dec 15, 2017
1 parent e1cf7f7 commit 55aabb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ubsan.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,10 @@ void __ubsan_handle_type_mismatch(struct type_mismatch_data *data,

if (!ptr)
handle_null_ptr_deref(data);
else if (data->alignment && !IS_ALIGNED(ptr, data->alignment))
else if (data->alignment && !IS_ALIGNED(ptr, data->alignment)) {
if (!IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS))
handle_missaligned_access(data, ptr);
else
} else
handle_object_size_mismatch(data, ptr);
}
EXPORT_SYMBOL(__ubsan_handle_type_mismatch);
Expand Down

0 comments on commit 55aabb8

Please sign in to comment.