From e2807fc2f9e8c8ca7977a8ef1295bb126f557e9e Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Wed, 18 Sep 2013 10:37:21 -0700 Subject: rgw: use bufferlist::append() instead of bufferlist::push_back() push_back() expects char *, whereas append can append a single char. Appending a NULL char to push_back is cast as a NULL pointer which is bad. Signed-off-by: Yehuda Sadeh --- src/rgw/rgw_rados.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index bada7d22d1b..5ec61b965a1 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -2616,7 +2616,7 @@ int RGWRados::copy_obj(void *ctx, { /* opening scope so that we can do goto, sorry */ bufferlist& extra_data_bl = processor.get_extra_data(); if (extra_data_bl.length()) { - extra_data_bl.push_back((char)0); + extra_data_bl.append((char)0); JSONParser jp; if (!jp.parse(extra_data_bl.c_str(), extra_data_bl.length())) { ldout(cct, 0) << "failed to parse response extra data. len=" << extra_data_bl.length() << " data=" << extra_data_bl.c_str() << dendl; -- cgit v1.2.1