~ubuntu-branches/ubuntu/raring/ceph/raring

« back to all changes in this revision

Viewing changes to debian/patches/extra-byte-for-null.patch

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-09-26 13:28:15 UTC
  • Revision ID: package-import@ubuntu.com-20120926132815-mqknhlfbqvzutm0s
Tags: 0.48.2-0ubuntu2
* Fix crash in radosgw on armhf architecture (LP: #1049582):
  - debian/patches/extra-byte-for-null.patch: Cherry picked patch
    from upstream VCS. Thanks to Yehuda Sadeh for pointing to this
    fix.
* d/ceph.lintian-overrides: Added libcls_rgw.so.1.0.0 to binaries
  which are not stripped.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From 2fddfb0a95288d39cee2e82376297ce43296743b Mon Sep 17 00:00:00 2001
 
2
From: Yehuda Sadeh <yehuda@inktank.com>
 
3
Date: Mon, 24 Sep 2012 18:10:24 -0700
 
4
Subject: [PATCH] rgw: url_decode should allocate extra byte for dest
 
5
 
 
6
Was missing extra byte for null termination
 
7
 
 
8
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
 
9
---
 
10
 src/rgw/rgw_common.cc |    2 +-
 
11
 1 file changed, 1 insertion(+), 1 deletion(-)
 
12
 
 
13
diff --git a/src/rgw/rgw_common.cc b/src/rgw/rgw_common.cc
 
14
index 675444b..6402a46 100644
 
15
--- a/src/rgw/rgw_common.cc
 
16
+++ b/src/rgw/rgw_common.cc
 
17
@@ -438,7 +438,7 @@ static char hex_to_num(char c)
 
18
 bool url_decode(string& src_str, string& dest_str)
 
19
 {
 
20
   const char *src = src_str.c_str();
 
21
-  char dest[src_str.size()];
 
22
+  char dest[src_str.size() + 1];
 
23
   int pos = 0;
 
24
   char c;
 
25
 
 
26
-- 
 
27
1.7.10
 
28