Project

General

Profile

Bug #4755

rgw: assumption of signed char

Added by Adam Borowski over 7 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
No
Severity:
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature:

Description

I'm testing ceph on an armhf based server. During compilation (from Debianized sources you provide), it turns out that in src/rgw/rgw_common.cc function url_decode(), there is an assumption that "char" is signed. That quite weird quirk is common to i386 and amd64, but on some other architectures, including arm*, "char" is unsigned.

A ham-fisted patch attached. I haven't actually tested it yet, but it compiles and looks kosher. In fact, the function above it, hex_to_num() has an obvious related bug in places where char is not unsigned (ie, not on arm), unless that data is validated somewhere else.

url_decode_arm.patch View (510 Bytes) Adam Borowski, 04/19/2013 09:16 AM

History

#1 Updated by Adam Borowski over 7 years ago

Doh, in the title, s/patch/char/, of course.

#2 Updated by Yehuda Sadeh over 7 years ago

  • Project changed from Ceph to rgw
  • Subject changed from assumption of signed patch to rgw: assumption of signed patch

#3 Updated by Ian Colle over 7 years ago

  • Subject changed from rgw: assumption of signed patch to rgw: assumption of signed char

#4 Updated by Yehuda Sadeh over 7 years ago

  • Target version set to v0.61 - Cuttlefish

#5 Updated by Ian Colle over 7 years ago

  • Tracker changed from Fix to Bug
  • Target version deleted (v0.61 - Cuttlefish)

#6 Updated by Ian Colle over 7 years ago

  • Assignee set to Yehuda Sadeh
  • Target version set to v0.61 - Cuttlefish

#7 Updated by Yehuda Sadeh over 7 years ago

Adam, I pushed a different fix to wip-4755 branch. Can you test it and make sure that it fixes the issue for you?

#8 Updated by Sage Weil over 7 years ago

  • Status changed from New to Resolved

Also available in: Atom PDF