Skip to content

Commit a71a093

Browse files
committed
Dereferencing to void induces 0 read bytes
1 parent 353d5a9 commit a71a093

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/pointer-analysis/value_set_dereference.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -988,8 +988,9 @@ bool value_set_dereferencet::memory_model_bytes(
988988
if(from_width<=0)
989989
throw "unknown or invalid type size:\n"+from_type.pretty();
990990

991-
mp_integer to_width=pointer_offset_size(to_type, ns);
992-
if(to_width<=0)
991+
mp_integer to_width=
992+
to_type.id()==ID_empty?0: pointer_offset_size(to_type, ns);
993+
if(to_width<0)
993994
throw "unknown or invalid type size:\n"+to_type.pretty();
994995

995996
exprt bound=from_integer(from_width-to_width, offset.type());

0 commit comments

Comments
 (0)