× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hello Jon,

Am 22.05.2020 um 21:44 schrieb Jon Paris <jon.paris@xxxxxxxxxxxxxx>:

Did you download the source a long time back Patrick?

Either that, or it's the source from the readymade package in Debian 9, maybe. Anyway, I corrected that possible issue.

Because the feature that uses that parm was added some long time ago. You might want to consider updating your source to the later version.

I did, see other mail.

Just to clarify - any C code written to be multi-platform will always need a X'00' termination for strings unless: 1) The length is also passed as a separate parm or 2) This is a rare case where the C code uses a fixed length field.

I was trying to work towards 2), because the output of pw_rand is supposed to be always 64 characters.

If those circumstances do not apply then there is no way for it to know the length without some termination.

Thanks. Yes, I'm aware of that. From the comments to my original post I had the impression that there's some "magic" happening somewhere to have the buffer for pw_rand's answer filled with X'00' beforehand. Or at least have the first char in the buffer being X'00'. Apparently it is not, which is nicely reassuring my understanding of C so far.

Glad the termination sorted your problem for you.

It did not. :-( I'm sure I messed something up.

:wq! PoC

PGP-Key: DDD3 4ABF 6413 38DE - https://www.pocnet.net/poc-key.asc



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.