[systemd-devel] [PATCH] shorten_uuid: use proper table size
Lennart Poettering
lennart at poettering.net
Tue Jun 10 10:20:10 PDT 2014
On Wed, 28.05.14 11:24, Maciej Wereski (m.wereski at partner.samsung.com) wrote:
> >When the function is called the buffer is filled with 36 chars, and we
> >then strip the non-hex-chars, so that 34 chars result. But the function
> >signature should still indicate that we need 36 chars initially..
> >
> >Lennart
>
> Well, i (< 36) is used for source and j (< 32) is used for destination.
> After the loop destination[32] and destination[33] is set. Also
> shorten_uuid() is used in two places, where id[34] is passed as
> destination. So it looked for me like destination should be 34.
I am an idiot and you are right... I now merged a patch that turns both
strings into arrays and we speciy both sizes. I hope that cleans up the
confusion. Please check!
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list