REST: fix oidc redirecto uri 0-terminator
authorSchanzenbach, Martin <mschanzenbach@posteo.de>
Thu, 24 Jan 2019 13:42:03 +0000 (14:42 +0100)
committerSchanzenbach, Martin <mschanzenbach@posteo.de>
Thu, 24 Jan 2019 13:42:03 +0000 (14:42 +0100)
src/rest-plugins/plugin_rest_openid_connect.c

index 1824ec43095e856461bb9e9d79d0d5315e517071..d7c0b4977cc137abf6c8f097588a841a296ca615 100644 (file)
@@ -1140,7 +1140,8 @@ lookup_redirect_uri_result (void *cls,
                      handle->oidc->redirect_uri,
                      rd[i].data_size))
       continue;
-    tmp = GNUNET_strdup (rd[i].data);
+    tmp = GNUNET_strndup (rd[i].data,
+                          rd[i].data_size);
     pos = strrchr (tmp,
                    (unsigned char) '.');
     *pos = '\0';