]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: NULL terminate buffer before parsing it
authorYehuda Sadeh <yehuda@inktank.com>
Wed, 11 Sep 2013 20:46:31 +0000 (13:46 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Thu, 19 Sep 2013 20:07:30 +0000 (13:07 -0700)
commitdaf85c45dd4d158bc7c33a2fb784857bc7db35cd
tree717a6b1c8d518e956b5a570243a55fb39283f155
parentc73040a5518971813b9ebaae1624c5bacef315d0
rgw: NULL terminate buffer before parsing it

Fixes: #6175
Backport: dumpling
We get a buffer off the remote gateway which might
not be NULL terminated. The JSON parser needs the
buffer to be NULL terminated even though we provide
a buffer length as it calls strlen().

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit e7f7483192cddca1159aba439ce62b1e78669d51)
src/rgw/rgw_rados.cc