diff options
author | Victor Hakoun <victor.hakoun@eurogiciel.fr> | 2013-06-12 16:52:49 +0200 |
---|---|---|
committer | Victor Hakoun <victor.hakoun@eurogiciel.fr> | 2013-06-12 16:52:49 +0200 |
commit | 4aeec7d05ec1a44340f580f5da478251a84e13da (patch) | |
tree | c11ca6f0dd0c0e457794211b4561535fe986b983 /vconftool.c | |
parent | c0b9f1b8f9b5dd480571f11ec2ed18c302a40592 (diff) | |
download | vconf-4aeec7d05ec1a44340f580f5da478251a84e13da.tar.gz vconf-4aeec7d05ec1a44340f580f5da478251a84e13da.tar.bz2 vconf-4aeec7d05ec1a44340f580f5da478251a84e13da.zip |
Fix string manipulation in x86_64 runtime
Diffstat (limited to 'vconftool.c')
-rwxr-xr-x | vconftool.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vconftool.c b/vconftool.c index a6fd967..82e7ad7 100755 --- a/vconftool.c +++ b/vconftool.c @@ -347,17 +347,17 @@ static int copy_memory_key(char *pszKey, char *pszOrigin) static int make_file_path(char *pszKey, char *pszBuf) { if (0 == - strncmp(pszKey, BACKEND_DB_PREFIX, sizeof(BACKEND_DB_PREFIX) - 1)) { + strncmp(pszKey, BACKEND_DB_PREFIX, strlen(BACKEND_DB_PREFIX))) { snprintf(pszBuf, BUFSIZE, "%s/%s", DB_PREFIX, pszKey); return 0; } else if (0 == strncmp(pszKey, BACKEND_FILE_PREFIX, - sizeof(BACKEND_FILE_PREFIX) - 1)) { + strlen(BACKEND_FILE_PREFIX))) { snprintf(pszBuf, BUFSIZE, "%s/%s", FILE_PREFIX, pszKey); return 0; } else if (0 == strncmp(pszKey, BACKEND_MEMORY_PREFIX, - sizeof(BACKEND_MEMORY_PREFIX) - 1)) { + strlen(BACKEND_MEMORY_PREFIX))) { snprintf(pszBuf, BUFSIZE, "%s/%s", MEMORY_PREFIX, pszKey); return 0; } |