* [including the GNU Public Licence.]
*/
-#define OPENSSL_FIPSAPI
+
#include <stdio.h>
#include "cryptlib.h"
{
const char *p;
- for (p = str; *p != '\0' && maxlen-- != 0; ++p)
+ for (p = str; maxlen-- != 0 && *p != '\0'; ++p)
;
return p - str;
char *BUF_strndup(const char *str, size_t siz)
{
char *ret;
- size_t len;
if (str == NULL) return(NULL);
- len = BUF_strnlen(str, siz);
- if (siz > len)
- siz = len;
+ siz = BUF_strnlen(str, siz);
ret=OPENSSL_malloc(siz+1);
if (ret == NULL)