diff options
author | ng0 <ng0@n0.is> | 2019-09-06 22:46:29 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-09-06 22:46:29 +0000 |
commit | 6e599264ad13e8fc105493d74d7c11d46f8739ed (patch) | |
tree | 169bef1ecbade5a659831fb169f3ae6943af127f /src/gnsrecord/plugin_gnsrecord_dns.c | |
parent | 4f13bc15113021ebf71d5d81e99bc29f8a07fc9c (diff) | |
download | gnunet-6e599264ad13e8fc105493d74d7c11d46f8739ed.tar.gz gnunet-6e599264ad13e8fc105493d74d7c11d46f8739ed.zip |
first step to remove plibc
Diffstat (limited to 'src/gnsrecord/plugin_gnsrecord_dns.c')
-rw-r--r-- | src/gnsrecord/plugin_gnsrecord_dns.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gnsrecord/plugin_gnsrecord_dns.c b/src/gnsrecord/plugin_gnsrecord_dns.c index 636a73403..3f62d3d77 100644 --- a/src/gnsrecord/plugin_gnsrecord_dns.c +++ b/src/gnsrecord/plugin_gnsrecord_dns.c | |||
@@ -415,13 +415,13 @@ dns_string_to_value (void *cls, | |||
415 | typep = strtok (sdup, " "); | 415 | typep = strtok (sdup, " "); |
416 | if ((NULL == typep) || | 416 | if ((NULL == typep) || |
417 | ((0 == (type = rfc4398_mnemonic_to_value (typep))) && | 417 | ((0 == (type = rfc4398_mnemonic_to_value (typep))) && |
418 | ((1 != SSCANF (typep, "%u", &type)) || (type > UINT16_MAX)))) | 418 | ((1 != sscanf (typep, "%u", &type)) || (type > UINT16_MAX)))) |
419 | { | 419 | { |
420 | GNUNET_free (sdup); | 420 | GNUNET_free (sdup); |
421 | return GNUNET_SYSERR; | 421 | return GNUNET_SYSERR; |
422 | } | 422 | } |
423 | keyp = strtok (NULL, " "); | 423 | keyp = strtok (NULL, " "); |
424 | if ((NULL == keyp) || (1 != SSCANF (keyp, "%u", &key)) || | 424 | if ((NULL == keyp) || (1 != sscanf (keyp, "%u", &key)) || |
425 | (key > UINT16_MAX)) | 425 | (key > UINT16_MAX)) |
426 | { | 426 | { |
427 | GNUNET_free (sdup); | 427 | GNUNET_free (sdup); |
@@ -486,7 +486,7 @@ dns_string_to_value (void *cls, | |||
486 | unsigned int soa_min; | 486 | unsigned int soa_min; |
487 | size_t off; | 487 | size_t off; |
488 | 488 | ||
489 | if (7 != SSCANF (s, | 489 | if (7 != sscanf (s, |
490 | "rname=%253s mname=%253s %u,%u,%u,%u,%u", | 490 | "rname=%253s mname=%253s %u,%u,%u,%u,%u", |
491 | soa_rname, | 491 | soa_rname, |
492 | soa_mname, | 492 | soa_mname, |
@@ -549,7 +549,7 @@ dns_string_to_value (void *cls, | |||
549 | unsigned int mx_pref; | 549 | unsigned int mx_pref; |
550 | size_t off; | 550 | size_t off; |
551 | 551 | ||
552 | if (2 != SSCANF (s, "%u,%253s", &mx_pref, mxhost)) | 552 | if (2 != sscanf (s, "%u,%253s", &mx_pref, mxhost)) |
553 | { | 553 | { |
554 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 554 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
555 | _ ("Unable to parse MX record `%s'\n"), | 555 | _ ("Unable to parse MX record `%s'\n"), |
@@ -582,7 +582,7 @@ dns_string_to_value (void *cls, | |||
582 | unsigned int port; | 582 | unsigned int port; |
583 | size_t off; | 583 | size_t off; |
584 | 584 | ||
585 | if (4 != SSCANF (s, "%u %u %u %253s", &priority, &weight, &port, srvtarget)) | 585 | if (4 != sscanf (s, "%u %u %u %253s", &priority, &weight, &port, srvtarget)) |
586 | { | 586 | { |
587 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 587 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
588 | _ ("Unable to parse SRV record `%s'\n"), | 588 | _ ("Unable to parse SRV record `%s'\n"), |
@@ -630,7 +630,7 @@ dns_string_to_value (void *cls, | |||
630 | size_t slen = strlen (s) + 1; | 630 | size_t slen = strlen (s) + 1; |
631 | char hex[slen]; | 631 | char hex[slen]; |
632 | 632 | ||
633 | if (4 != SSCANF (s, "%u %u %u %s", &usage, &selector, &matching_type, hex)) | 633 | if (4 != sscanf (s, "%u %u %u %s", &usage, &selector, &matching_type, hex)) |
634 | { | 634 | { |
635 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 635 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
636 | _ ("Unable to parse TLSA record string `%s'\n"), | 636 | _ ("Unable to parse TLSA record string `%s'\n"), |
@@ -662,7 +662,7 @@ dns_string_to_value (void *cls, | |||
662 | char tag[15]; //Max tag length 15 | 662 | char tag[15]; //Max tag length 15 |
663 | char value[strlen (s) + 1]; //Should be more than enough | 663 | char value[strlen (s) + 1]; //Should be more than enough |
664 | 664 | ||
665 | if (3 != SSCANF (s, "%u %s %[^\n]", &flags, tag, value)) | 665 | if (3 != sscanf (s, "%u %s %[^\n]", &flags, tag, value)) |
666 | { | 666 | { |
667 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 667 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
668 | _ ("Unable to parse CAA record string `%s'\n"), | 668 | _ ("Unable to parse CAA record string `%s'\n"), |