Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.1:Rings:1-MinimalX
libyajl
9c2948a3-yajl_tree_get-len-fix.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 9c2948a3-yajl_tree_get-len-fix.patch of Package libyajl
Subject: validate the length of the correct object in yajl_tree_get From: Rob Zuber rob@zuber.net Tue May 24 19:00:27 2011 -0700 Date: Tue May 24 19:00:27 2011 -0700: Git: 9c2948a33165c650122d131f31140c15321908f5 diff --git src/yajl_tree.c src/yajl_tree.c index 3e7da94..8f871a4 100644 --- src/yajl_tree.c +++ src/yajl_tree.c @@ -457,15 +457,17 @@ yajl_val yajl_tree_get(yajl_val n, const char ** path, yajl_type type) if (!path) return NULL; while (n && *path) { unsigned int i; + int len; if (n->type != yajl_t_object) return NULL; - for (i = 0; i < n->u.object.len; i++) { + len = n->u.object.len; + for (i = 0; i < len; i++) { if (!strcmp(*path, n->u.object.keys[i])) { n = n->u.object.values[i]; break; } } - if (i == n->u.object.len) return NULL; + if (i == len) return NULL; path++; } if (n && type != yajl_t_any && type != n->type) n = NULL;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor