Bug 395281 - g_base64_encode cannot encode one byte data
Summary: g_base64_encode cannot encode one byte data
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: glib2
Version: 8
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Matthias Clasen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-22 07:13 UTC by Milan Crha
Modified: 2007-11-30 22:12 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 2007-11-23 18:00:40 UTC


Attachments (Terms of Use)

Description Milan Crha 2007-11-22 07:13:09 UTC
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 13:06:36 UTC
Reassigning glib -> glibc

Comment 2 Matthias Clasen 2007-11-23 18:00:40 UTC
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.