Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

url_get_pathname crashing #3

Open
stephenmathieson opened this issue Dec 4, 2013 · 3 comments
Open

url_get_pathname crashing #3

stephenmathieson opened this issue Dec 4, 2013 · 3 comments

Comments

@stephenmathieson
Copy link

[ pretend i wrote a useful, very verbose description here ]

foo.c

#include <stdio.h>
#include "url.h"

int main() {
  char *url = "https://github.com/jwerle/url.h";
  printf("url: '%s'\n", url);

  char *repo = url_get_pathname(url);
  printf("repo: '%s'\n", repo);
  return 0;
}

then:

$ make foo
$ ./foo
url: 'https://github.com/jwerle/url.h'
Abort trap: 6
$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix

any ideas?

@jwerle
Copy link
Owner

jwerle commented Dec 4, 2013

Yeah this whole header file can be reworked.. I started https://github.com/jwerle/liburl which will provide the same api eventually.

@RokerHRO
Copy link
Collaborator

It no longer crashes but gives the wrong pathname "/".

@jwerle
Copy link
Owner

jwerle commented Jun 28, 2023

It no longer crashes but gives the wrong pathname "/".

lets open an issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants