Skip to content

Commit

Permalink
Fix yaz_scan - 3 args gives SEGV PHPYAZ-34
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdickmeiss committed Aug 31, 2017
1 parent 349559c commit 72542c6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions php_yaz.c
Original file line number Diff line number Diff line change
Expand Up @@ -1858,9 +1858,11 @@ PHP_FUNCTION(yaz_scan)
ZOOM_scanset_destroy(p->zoom_scan);
p->zoom_scan = 0;
if (p) {
option_set(p, "number", array_lookup_string(flags_ht, "number"));
option_set(p, "position", array_lookup_string(flags_ht, "position"));
option_set(p, "stepSize", array_lookup_string(flags_ht, "stepsize"));
if (flags_ht) {
option_set(p, "number", array_lookup_string(flags_ht, "number"));
option_set(p, "position", array_lookup_string(flags_ht, "position"));
option_set(p, "stepSize", array_lookup_string(flags_ht, "stepsize"));
}
p->zoom_scan = ZOOM_connection_scan(p->zoom_conn, query);
}
release_assoc(p);
Expand Down

0 comments on commit 72542c6

Please sign in to comment.