php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67216 Segfault on SetGroupBy
Submitted: 2014-05-06 12:54 UTC Modified: 2014-05-06 13:22 UTC
From: saprykin dot dmitry at gmail dot com Assigned: tony2001 (profile)
Status: Closed Package: sphinx (PECL)
PHP Version: Irrelevant OS:
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: saprykin dot dmitry at gmail dot com
New email:
PHP Version: OS:

 

 [2014-05-06 12:54 UTC] saprykin dot dmitry at gmail dot com
Description:
------------
$sphinxClient->SetGroupBy('tags', SPH_GROUPBY_ATTR, "@count desc");
causes php segfault

sphinx-1.3.0/sphinx.c:683

static PHP_METHOD(SphinxClient, setGroupBy)
{
  ....
  int attribute_len, groupsort_len, func, res;

  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl|s", &attribute, &attribute_len, &func, &groupsort, &groupsort_len) == FAILURE) {
    return;
  }
  ......

Long parameter declaration for "zend_parse_parameters" but int "func" variable




Patches

SetGroupBy-params-bugfix (last revision 2014-05-06 12:56 UTC by saprykin dot dmitry at gmail dot com)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-05-06 12:58 UTC] tony2001@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: tony2001
 [2014-05-06 13:22 UTC] tony2001@php.net
-Status: Assigned +Status: Closed
 [2014-05-06 13:22 UTC] tony2001@php.net
Fixed in Git, thanks a lot for reporting this.
I'll release new version in a few minutes.
 [2014-05-06 13:22 UTC] tony2001@php.net
Automatic comment on behalf of tony@daylessday.org
Revision: http://git.php.net/?p=pecl/search_engine/sphinx.git;a=commit;h=9ac2c5951c7b278db2f62dea117fa271e1af594f
Log: fix bug #67216 (segfault on setGroupBy())
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jan 15 09:01:28 2025 UTC