Bug 395281 - g_base64_encode cannot encode one byte data
g_base64_encode cannot encode one byte data
Product: Fedora
Classification: Fedora
Component: glib2 (Show other bugs)
All Linux
low Severity high
: ---
: ---
Assigned To: Matthias Clasen
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-11-22 02:13 EST by Milan Crha
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-11-23 13:00:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Milan Crha 2007-11-22 02:13:09 EST
Description of problem:
When I was testing some data in my project I realized that g_base64_encode
cannot encode data with length=1, it just returns NULL and shows a runtime
warning on console that assertion length>1 failed. I think it's obvious bug, I
should be able to encode one byte data to base64. Hence severity high.

Version-Release number of selected component (if applicable):
I'm not sure if it's in this package, but probably it is: glibc-2.7-2
Comment 1 Rex Dieter 2007-11-22 08:06:36 EST
Reassigning glib -> glibc
Comment 2 Matthias Clasen 2007-11-23 13:00:40 EST
Fixed in upstream svn

2007-11-23  Matthias Clasen  <mclasen@redhat.com>

        * glib/gbase64.c (g_base64_encode): Don't refuse to encode
        a single byte.  (Milan Crha)

        * tests/base64-test.c: Test encoding short strings.

Note You need to log in before you can comment on or make changes to this bug.