diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2012-09-12 13:32:31 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2012-09-12 13:33:22 +0300 |
commit | 3226c2073a71818ab45de6784840ccdc28d07b46 (patch) | |
tree | dded46644babee3619119e3cdbbbdec2dc2b651e /rpmio | |
parent | bed3880ef1aac914970a712ed295dad68947bb7d (diff) | |
download | librpm-tizen-3226c2073a71818ab45de6784840ccdc28d07b46.tar.gz librpm-tizen-3226c2073a71818ab45de6784840ccdc28d07b46.tar.bz2 librpm-tizen-3226c2073a71818ab45de6784840ccdc28d07b46.zip |
String pool id 0 equals NULL
- Pool id 0 is special case for "not found". Return an actual NULL
instead of an empty string.
Diffstat (limited to 'rpmio')
-rw-r--r-- | rpmio/rpmstrpool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rpmio/rpmstrpool.c b/rpmio/rpmstrpool.c index 1eb379ada..38b676c03 100644 --- a/rpmio/rpmstrpool.c +++ b/rpmio/rpmstrpool.c @@ -146,7 +146,7 @@ rpmsid rpmstrPoolId(rpmstrPool pool, const char *s, int create) const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid) { const char *s = NULL; - if (pool && sid <= pool->offs_size) + if (pool && sid > 0 && sid <= pool->offs_size) s = pool->data + pool->offs[sid]; return s; } |