Skip to content

ipaddr_remote segfaults on domain names, not actually tested? #224

Description

@wusspuss

Adaptation from the tutorial:

#include <libdill.h>
#include <stdio.h>

int main() {
  struct ipaddr addr;
  int rc = ipaddr_remote(&addr, "example.org", 80, 0, -1);
  if (rc != 0) {
    printf("rc=%i,errno=%i\n",rc,errno);
    return 1;
  }
   
  return 0;
}

Sometimes prints rc=-1,errno=99 (not a valid errno), sometimes segfaults straight away. If you swap "example.org" for "127.0.0.1" it works just fine. From grepping tests/ for ipaddr_remote it seems it's only tested for 0.0.0.0 and 127.0.0.1 and not domain names.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions