|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-12-10 05:12 UTC] lstrojny@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 01:00:01 2025 UTC |
Description: ------------ in 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"); peraphs..? 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) { RETURN_FALSE; } - 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) { RETURN_FALSE; } Actual result: -------------- format string bug.