[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/6] Add base64 encoder/decoder
From: |
Jan Kiszka |
Subject: |
Re: [Qemu-devel] [PATCH 2/6] Add base64 encoder/decoder |
Date: |
Fri, 26 Aug 2011 20:02:37 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
On 2011-08-26 17:47, Jan Kiszka wrote:
> On 2011-08-26 17:23, Jan Kiszka wrote:
>> On 2011-08-26 17:21, Peter Maydell wrote:
>>> On 26 August 2011 15:48, Jan Kiszka <address@hidden> wrote:
>>>> Will be used by QBuffer.
>>>
>>> Is it possible to use the glib base64 encode/decode routines instead
>>> of rolling our own here?
>>
>> Yeah, times are changing. Need to check what's there and how to use it.
>
> Requires glib >= 2.12, we are currently at >= 2.0, right? Would it be OK
> to raise the entry barrier?
>
> I'm also still looking for error handling of g_base64_decode. I guess
> one is supposed to compare returned length against some expected value.
> Well, it's glib...
The length check is not sufficient, and glib's decoder fails on my
invalid input string tests.
I think proper error detection in base64 inputs is a worthwhile feature
that glib lacks. So I'll stick with roll-our-own (actually, it's
Mozilla's version).
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
[Qemu-devel] [PATCH 5/6] monitor: Add basic device state visualization, Jan Kiszka, 2011/08/26
[Qemu-devel] [PATCH 6/6] qdev: Generate IDs for anonymous devices, Jan Kiszka, 2011/08/26
Re: [Qemu-devel] [PATCH 0/6] Device state visualization reloaded, Anthony Liguori, 2011/08/29