Jelajahi Sumber

Only do a memmove when size is positive

The previous code would do a unbounded memmove if the discard_len was
greater than the data_len. This patch puts a check in place to make sure
we do not do huge memory moves due to an integer wrapping around into
the unsigned size_t type. This occurs due to an implicit cast from the
subtraction
Matt Clarkson 10 tahun lalu
induk
melakukan
f5eecb5988

Data Diff Tidak Tersedia.