diff options
author | Max Kellermann <max@duempel.org> | 2011-08-30 21:32:40 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-08-30 21:33:02 +0200 |
commit | 9592c0b466d2c6c93656cdd5e5c4807e8e15d65a (patch) | |
tree | 4bf9d1bbe24ce0c2919038e620dbf3afdc60d40c /src | |
parent | a33537b2b98a1acf40bb2bf960e3dc3ba9132fda (diff) | |
download | mpd-9592c0b466d2c6c93656cdd5e5c4807e8e15d65a.tar.gz mpd-9592c0b466d2c6c93656cdd5e5c4807e8e15d65a.tar.xz mpd-9592c0b466d2c6c93656cdd5e5c4807e8e15d65a.zip |
rtsp_client: increment "dp" after terminating the string
This fixes a bug that caused all values to be an empty string.
Diffstat (limited to 'src')
-rw-r--r-- | src/rtsp_client.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rtsp_client.c b/src/rtsp_client.c index 0280581f7..a2bc19cdb 100644 --- a/src/rtsp_client.c +++ b/src/rtsp_client.c @@ -458,10 +458,11 @@ exec_request(struct rtspcl_data *rtspcld, const char *cmd, "request failed, bad header"); return false; } - *dp = 0; + + *dp++ = 0; new_kd = g_new(struct key_data, 1); new_kd->key = g_strdup(line); - dsize = strlen(dp + 1) + 1; + dsize = strlen(dp) + 1; new_kd->data = g_strdup(dp); new_kd->next = NULL; if (cur_kd == NULL) { |