php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31173 php_sprintf.c uses wrong type for vsprintf() retval
Submitted: 2004-12-18 04:04 UTC Modified: 2004-12-18 04:17 UTC
From: lukem at NetBSD dot org Assigned:
Status: Closed Package: Compile Warning
PHP Version: 4.3.10 OS: NetBSD
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
49 - 21 = ?
Subscribe to this entry?

 
 [2004-12-18 04:04 UTC] lukem at NetBSD dot org
Description:
------------
php_sprintf.c::php_sprintf() has
  char *ret;
  // [...]
  ret = vsprintf (s, format, args);

yet vsprintf() returns `int' not `char *'.

The fix is trivial; replace
  char *ret;
with
  int ret;
on line 29 of main/php_sprintf.c


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-18 04:17 UTC] sniper@php.net
Was already fixed yesterday.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 13 20:01:28 2024 UTC