Lines Matching refs:str
196 size_t printf_decode(u8 *buf, size_t maxlen, const char *str) in printf_decode() argument
198 const char *pos = str; in printf_decode()
316 char *str; in wpa_config_parse_string() local
322 str = dup_binstr(value, *len); in wpa_config_parse_string()
323 if (str == NULL) in wpa_config_parse_string()
325 return str; in wpa_config_parse_string()
328 char *tstr, *str; in wpa_config_parse_string() local
339 str = os_malloc(tlen + 1); in wpa_config_parse_string()
340 if (str == NULL) { in wpa_config_parse_string()
345 *len = printf_decode((u8 *) str, tlen + 1, tstr); in wpa_config_parse_string()
348 return str; in wpa_config_parse_string()
350 u8 *str; in wpa_config_parse_string() local
358 str = (u8 *)os_malloc(*len + 1); in wpa_config_parse_string()
359 if (str == NULL) { in wpa_config_parse_string()
362 memcpy(str, value, *len); in wpa_config_parse_string()
363 str[*len] = '\0'; in wpa_config_parse_string()
364 return (char *) str; in wpa_config_parse_string()
368 str = os_malloc(tlen + 1); in wpa_config_parse_string()
369 if (str == NULL) in wpa_config_parse_string()
371 if (hexstr2bin(value, str, tlen)) { in wpa_config_parse_string()
372 os_free(str); in wpa_config_parse_string()
375 str[tlen] = '\0'; in wpa_config_parse_string()
377 return (char *) str; in wpa_config_parse_string()
464 void str_clear_free(char *str) in str_clear_free() argument
466 if (str) { in str_clear_free()
467 size_t len = os_strlen(str); in str_clear_free()
468 forced_memzero(str, len); in str_clear_free()
469 os_free(str); in str_clear_free()