Skip to content
Unverified Commit 992083b1 authored by Marcel Raad's avatar Marcel Raad
Browse files

examples/fopen: fix comparison

As want is size_t, (file->buffer_pos - want) is unsigned, so checking
if it's less than zero makes no sense.
Check if file->buffer_pos is less than want instead to avoid the
unsigned integer wraparound.

Closes https://github.com/curl/curl/pull/3975
parent e23c52b3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment