Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Fleur – A bloom filter implementation in C. Parent comment
The line below that is worse:
strncpy(bloom_path , argv[optind], 128);
If you pass something >= 128 chars then bloom_path won't be null terminated. In general strncpy should never be used for copying strings.
For expansion on that: https://ramblings.implicit.net/c/2014/05/02/c-functions-that...
The line below that is worse:
strncpy(bloom_path , argv[optind], 128);
If you pass something >= 128 chars then bloom_path won't be null terminated. In general strncpy should never be used for copying strings.
For expansion on that: https://ramblings.implicit.net/c/2014/05/02/c-functions-that...