6 ms·
An example wold be to use memcpy() instead of strcpy(). memcpy() always copies n bytes, regardless of actual string size so is very deterministic and (commonly
by TickleSteve 11y ago
An example wold be to use memcpy() instead of strcpy().
memcpy() always copies n bytes, regardless of actual string size so is very deterministic and (commonly) inlined so is static.
strcpy() on the other hand would loop infinitely until it found a null-terminator, it also is not deterministic.
memcpy() is easily analysable. strcpy() isn't.