misc.c+283: respect buflen instead of unconditional QUEUE_ID_LEN

Issue #1032 resolved
Rolf Weber created an issue

Hi!

While debugging another issue i ran across the code at https://bitbucket.org/jsuto/piler/src/538019632510868ffb9dc9324dc8fe1020a83baa/src/misc.c#lines-283 .
There are always QUEUE_ID_LEN bytes copied to the buffer pointed to by buf instead of respecting the parameter buflen passed to the function.
This is probably fine for the existing code base, as all calls of make_random_string() are done with either BUFLEN-3 (==29) or QUEUE_ID_LEN as the size argument.

Cheers,
Rolf Weber

Comments (3)

  1. Log in to comment