[erlang-patches] Fix using sizeof for array given as function argument

Niclas Axelsson <>
Mon Feb 28 15:58:01 CET 2011

On 02/26/2011 12:23 AM, Cristian Greco wrote:
> Hi,
> when using the sizeof() operator for an array given as function argument
> it returns the size of the pointer instead of the size of the array.
> In this case, the affected function hex(char digest[16], char buff[33])
> will just print 4 or 8 byte instead of the full length of 16 bytes, on
> 32bit and 64bit systems respectively.
>    git :cristiangreco/otp.git  cg/fix-sizeof-array-arg

Thanks Cristian,

Your patch have been merged into 'pu'.

Niclas Axelsson, Erlang/OTP

More information about the erlang-patches mailing list