diff options
author | David Robillard <d@drobilla.net> | 2012-12-20 21:34:41 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-12-20 21:34:41 +0000 |
commit | 9d36ba3e802705b1d6236eefc99916af6116a448 (patch) | |
tree | 0bdfcecf577c76acff5acf568ffa9491f804716b /src/uri.c | |
parent | 1460a4b83fb70b728906a24f49da4f1745a10776 (diff) | |
download | serd-9d36ba3e802705b1d6236eefc99916af6116a448.tar.gz serd-9d36ba3e802705b1d6236eefc99916af6116a448.tar.bz2 serd-9d36ba3e802705b1d6236eefc99916af6116a448.zip |
Fix crash when resolving against non-standard base URIs.
git-svn-id: http://svn.drobilla.net/serd/trunk@400 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src/uri.c')
-rw-r--r-- | src/uri.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -325,10 +325,7 @@ merge(SerdChunk* base, SerdChunk* path) const uint8_t* begin = remove_dot_segments(path->buf, path->len, &up); const uint8_t* end = path->buf + path->len; - if (base->buf) { - assert(base->len > 0); - assert(base->buf[0] == '/'); - + if (base->buf && base->len > 0) { // Find the up'th last slash const uint8_t* base_last = (base->buf + base->len - 1); ++up; |