Skip to content

Commit

Permalink
Merge branch '5.5' into PHP-5.5
Browse files Browse the repository at this point in the history
* 5.5:
  Fixed SNMP_ERR_TOOBIG handling for bulk walk operations. (Boris Lytochkin)
  • Loading branch information
Boris Lytochkin committed Dec 19, 2013
2 parents 7a402ca + 324eb07 commit e195faa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions NEWS
Expand Up @@ -38,6 +38,9 @@ PHP NEWS
. Fixed reavlidate_path=1 behavior to avoid caching of symlinks values.
(Dmitry)

- SNMP:
. Fixed SNMP_ERR_TOOBIG handling for bulk walk operations. (Boris Lytochkin)

- SOAP
. Fixed bug #66112 (Use after free condition in SOAP extension).
(martin dot koegler at brz dot gv dot at)
Expand Down
6 changes: 6 additions & 0 deletions ext/snmp/snmp.c
Expand Up @@ -896,6 +896,12 @@ static void php_snmp_internal(INTERNAL_FUNCTION_PARAMETERS, int st,
keepwalking = 1;
}
} else {
if (st & SNMP_CMD_WALK && response->errstat == SNMP_ERR_TOOBIG && objid_query->max_repetitions > 1) { /* Answer will not fit into single packet */
objid_query->max_repetitions /= 2;
snmp_free_pdu(response);
keepwalking = 1;
continue;
}
if (!(st & SNMP_CMD_WALK) || response->errstat != SNMP_ERR_NOSUCHNAME || Z_TYPE_P(return_value) == IS_BOOL) {
for ( count=1, vars = response->variables;
vars && count != response->errindex;
Expand Down

0 comments on commit e195faa

Please sign in to comment.