Lines Matching refs:buf_len
192 size_t buf_len;
201 if (fgets(rc->buf, rc->buf_len, rc->f) == NULL)
212 if (len >= rc->buf_len)
213 len = rc->buf_len - 1;
219 rc->buf[rc->buf_len - 1] = '\0';
265 rc->buf_len = 2048;
266 rc->buf = os_malloc(rc->buf_len);
477 static void eap_fast_write(char **buf, char **pos, size_t *buf_len,
493 if (*pos - *buf + need > *buf_len) {
494 char *nbuf = os_realloc(*buf, *buf_len + need);
501 *buf_len += need;
503 end = *buf + *buf_len;
574 char **pos, size_t *buf_len)
578 ret = os_snprintf(*pos, *buf + *buf_len - *pos,
580 if (ret < 0 || ret >= *buf + *buf_len - *pos)
584 eap_fast_write(buf, pos, buf_len, "PAC-Key",
586 eap_fast_write(buf, pos, buf_len, "PAC-Opaque",
588 eap_fast_write(buf, pos, buf_len, "PAC-Info",
590 eap_fast_write(buf, pos, buf_len, "A-ID",
592 eap_fast_write(buf, pos, buf_len, "I-ID",
594 eap_fast_write(buf, pos, buf_len, "A-ID-Info",
601 ret = os_snprintf(*pos, *buf + *buf_len - *pos, "END\n");
602 if (ret < 0 || ret >= *buf + *buf_len - *pos)
623 size_t buf_len;
628 buf_len = 1024;
629 pos = buf = os_malloc(buf_len);
633 ret = os_snprintf(pos, buf + buf_len - pos, "%s\n", pac_file_hdr);
634 if (ret < 0 || ret >= buf + buf_len - pos) {
642 if (eap_fast_add_pac_data(pac, &buf, &pos, &buf_len)) {