Use get_size_range instead of get_range to obtain range of valid sizes.
authorMartin Sebor <msebor@redhat.com>
Sun, 30 Aug 2020 21:10:44 +0000 (15:10 -0600)
committerMartin Sebor <msebor@redhat.com>
Sun, 30 Aug 2020 21:11:48 +0000 (15:11 -0600)
commit6ccadc4c0486ff011a32c74de1a31148acb3cbe2
tree83a984530c8523cf8565da5aa1fe8da7a9d20f92
parenta240e83ce9d92786ac9a15ab815b58197b85ada2
Use get_size_range instead of get_range to obtain range of valid sizes.

gcc/ChangeLog:

* builtins.c (access_ref::access_ref): Call get_size_range instead
of get_range.

gcc/testsuite/ChangeLog:

* gcc.dg/Wstringop-overread-3.c: New test.
gcc/builtins.c
gcc/testsuite/gcc.dg/Wstringop-overread-3.c [new file with mode: 0644]