From: "Todd C. Miller" Subject: Re: fix object header parser for zero-length object headers To: Stefan Sperling Cc: gameoftrees@openbsd.org Date: Fri, 28 Jan 2022 08:17:25 -0700 Now that you guarantee that buf is NUL-terminated there is no need for strnlen() so you can just do: (*obj)->hdrlen = strlen(buf) + 1 /* '\0' */; - todd