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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
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)

Add a Patch

Pull Requests

Add a Pull Request

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-2021 The PHP Group
All rights reserved.
Last updated: Tue Nov 30 03:03:16 2021 UTC