|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58452 wrong format string
Submitted: 2008-12-09 21:02 UTC Modified: 2008-12-10 05:12 UTC
From: crrodriguez at opensuse dot org Assigned: lstrojny (profile)
Status: Closed Package: mogilefs (PECL)
PHP Version: 5_2 CVS-2008-12-09 (dev) OS: Irrelevant
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: crrodriguez at opensuse dot org
New email:
PHP Version: OS:


 [2008-12-09 21:02 UTC] crrodriguez at opensuse dot org

 PHP_METHOD(MogileFs, getDomains)

there is the following code

request_len = spprintf(&request, 0, "GET_DOMAINS\r\n", mogilefs_sock->domain);

did you mean

request_len = spprintf(&request, 0, "GET_DOMAINS\r\n"); 


Compiler rightfully emits a warning.

Reproduce code:

Expected result:
Index: mogilefs.c
--- mogilefs.c.orig 2008-12-10 00:44:23.000000000 +0100
+++ mogilefs.c  2008-12-10 01:05:49.000000000 +0100
@@ -875,7 +875,7 @@ PHP_METHOD(MogileFs, getDomains)
    if (mogilefs_sock_get(object, &mogilefs_sock TSRMLS_CC) < 0) {
-   request_len = spprintf(&request, 0, "GET_DOMAINS\r\n", mogilefs_sock->domain);
+   request_len = spprintf(&request, 0, "GET_DOMAINS\r\n");
    if (MOGILEFS_SOCK_WRITE_FREE(mogilefs_sock, request, request_len) < 0) {

Actual result:
format string bug.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-12-10 05:12 UTC]
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on

In case this was a website problem, the change will show
up on the website in short time.
Thank you for the report, and for helping us make PECL better.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Dec 01 13:01:26 2023 UTC