php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59573 Off-by-one in my_serialize_object()
Submitted: 2011-01-13 16:24 UTC Modified: 2016-08-31 16:02 UTC
From: tricky dot pecl at luuseri dot com Assigned: cmb (profile)
Status: Wont fix Package: APC (PECL)
PHP Version: 5.3.2 OS: Linux/Ubuntu 10.04.1
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2011-01-13 16:24 UTC] tricky dot pecl at luuseri dot com
Description:
------------
In apc_main.c, on line 247 my_serialize_object copies 
serializer output into a zval. It attempts to copy len + 1 
bytes, which causes an off by one error.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-02-21 08:18 UTC] paulgao at yeah dot net
my_serialize_object in apc_compile.c???
 [2011-02-21 08:35 UTC] tricky dot pecl at luuseri dot com
Yes indeed, I reported the incorrect file, the correct file is 
apc_compile.c.

I worked around this issue by explicitly adding a NUL byte in 
igbinary, but this may still bite later on. The built-in 
serializer always NUL terminates its output.
 [2016-08-31 16:02 UTC] cmb@php.net
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2016-08-31 16:02 UTC] cmb@php.net
According to <https://bugs.php.net/69618>, APC support has been
discontinued in favor of OPcache, APCu, the session upload
progress API and WinCache. Therefore this issue won't get fixed.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Dec 01 23:03:34 2021 UTC