3 ms·
Good news. Arrays have sizeof(arr)/sizeof(arr[0]) elements and strings have strlen(str) letters.
by okasaki 11y ago
Good news. Arrays have sizeof(arr)/sizeof(arr[0]) elements and strings have strlen(str) letters.
- deleted 11y ago[deleted]
- pjc50 11y ago.. until you pass them as a function argument. And strlen() only works if your null terminator is valid, and doesn't tell you anything about available space in the string buffer for adding to the string. This kind of thing keeps coming up in vulnerability reports.
- ArkyBeagle 11y agoThis happens because people don't use the tools properly.
- adrianN 11y agoThey should be using Ada instead of C, amiright /s
- ArkyBeagle 11y agoI have no way of knowing what they should use.
- noir_lord 11y agoIf different people keep chopping into themselves with a power tool it's probably wise to consider a safety guard.
- ArkyBeagle 11y agoWrong is still wrong, and if someone did it, they did it wrong. This really isn't complicated. It's hardly obscure. There's no excuse.