From: Patrick Gaubatz Date: Sun, 23 Nov 2014 17:43:11 +0000 (+0100) Subject: minor code clean-up in access_ticket_verify2() X-Git-Tag: v4.1~695 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=25e48734c9faafcefb85c3aa701243da6017552d;p=thirdparty%2Ftvheadend.git minor code clean-up in access_ticket_verify2() --- diff --git a/src/access.c b/src/access.c index 1c9242928..ac9eea5fc 100644 --- a/src/access.c +++ b/src/access.c @@ -153,11 +153,11 @@ access_ticket_verify2(const char *id, const char *resource) if((at = access_ticket_find(id)) == NULL) return NULL; - char at_resource_with_webroot[256]; - strcat(at_resource_with_webroot, tvheadend_webroot ?: ""); - strcat(at_resource_with_webroot, at->at_resource); + char buf[256]; + strcpy(buf, tvheadend_webroot ?: ""); + strcat(buf, at->at_resource); - if(strcmp(at->at_resource, resource) && strcmp(at_resource_with_webroot, resource)) + if(strcmp(buf, resource)) return NULL; return access_copy(at->at_access);