cpprestsdk icon indicating copy to clipboard operation
cpprestsdk copied to clipboard

fix format-truncation on 64bit

Open priv-kweihmann opened this issue 5 years ago • 12 comments

GCC 10.x rightfully complains about out-of-bounds snprintf operation on 64bit systems, where size_t could be 64bit sized. Cast bytes_read down to 32bit and printf it without specifying input format

Fixes #1461

Signed-off-by: Konrad Weihmann [email protected]

priv-kweihmann avatar Jul 07 '20 11:07 priv-kweihmann

@BrandonStaab anything I can do to get this merged?

priv-kweihmann avatar Oct 20 '20 18:10 priv-kweihmann

@all is there anything I can do to get this here merged?

priv-kweihmann avatar Jan 23 '21 20:01 priv-kweihmann

Merge request helped me. All autotests passed. gcc 10.2.0 Arch Linux 5.10.16-arch1-1

Alexander-Degtyar avatar Feb 18 '21 18:02 Alexander-Degtyar

Any chances to see this merged and released?

Hyask avatar Mar 02 '21 11:03 Hyask

Trying to build on Arch via AUR and getting errors. Building with this PR fixes all issues...please merge and release

nlogozzo avatar Mar 02 '21 17:03 nlogozzo

Soon this PR will have its first anniversary - is there the slightest chance of getting it at least merged - I mean to me this is a critical bug, as without it even compilation is broken

priv-kweihmann avatar May 19 '21 14:05 priv-kweihmann

@barcharcraz, can you give us some feedback on this as everyone using a modern compiler gets a compilation error without this PR

BrandonStaab avatar May 25 '21 18:05 BrandonStaab

2 years passed, looks we have to carry this manually with ourselves.

keyonjie avatar Aug 09 '22 21:08 keyonjie

2 years passed, looks we have to carry this manually with ourselves.

Maybe time to drop this PR to increase the pressure :imp: :grin:

priv-kweihmann avatar Aug 22 '22 19:08 priv-kweihmann

@barcharcraz, as the other former maintainers are not responding to the merge this code change here, would you be willing to unblock the compilation for anyone with having gcc 10+?

priv-kweihmann avatar Aug 22 '22 19:08 priv-kweihmann