On Fri, 26 Aug 2011 20:02:37 +0200 Jan Kiszka <jan.kis...@siemens.com> wrote:
> 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 <jan.kis...@siemens.com> 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). The guest-agent is using glib's to implement file read & write, I think it should switch to Jan's implementation?