From d846d0e80aa0822ab3f59eea9e85413c4d357748 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Sun, 5 Jun 2011 21:57:01 +0000 Subject: [PATCH] Fixed bug #51997 (SEEK_CUR with 0 value, returns a warning). --- NEWS | 1 + ext/bz2/tests/bug51997.phpt | 24 ++++++++++++++++++++++++ main/streams/streams.c | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 ext/bz2/tests/bug51997.phpt diff --git a/NEWS b/NEWS index cc522cf53f1..f30d8dadea0 100644 --- a/NEWS +++ b/NEWS @@ -47,6 +47,7 @@ PHP NEWS . Fixed bug #54721 (Different Hashes on Windows, BSD and Linux on wrong Salt size) (Pierre, os at irj dot ru) . Fixed bug #53848 (fgetcsv() ignores spaces at beginnings of fields). (Ilia) + . Fixed bug #51997 (SEEK_CUR with 0 value, returns a warning). (Ilia) . Fixed bug #50363 (Invalid parsing in convert.quoted-printable-decode filter). (slusarz at curecanti dot org) . Fixed bug #48465 (sys_get_temp_dir() possibly inconsistent when using diff --git a/ext/bz2/tests/bug51997.phpt b/ext/bz2/tests/bug51997.phpt new file mode 100644 index 00000000000..fea53989477 --- /dev/null +++ b/ext/bz2/tests/bug51997.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #51997 (SEEK_CUR with 0 value, returns a warning) +--SKIPIF-- + +--FILE-- + 0) { + if (whence == SEEK_CUR && offset >= 0) { char tmp[1024]; size_t didread; while(offset > 0) {