From 5b014e07251857967ecbb4b873f8279b1ffe4e51 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Fri, 25 Nov 2011 09:30:50 +0100 Subject: [PATCH] Fs: use strncmp instead of memcmp for comparing strings --- src/node_file.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node_file.cc b/src/node_file.cc index 411f86ce7d..dd29486562 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -256,9 +256,9 @@ Local FSError(int errorno, if (path) { #ifdef _WIN32 - if (memcmp(path, "\\\\?\\UNC\\", 8) == 0) { + if (strncmp(path, "\\\\?\\UNC\\", 8) == 0) { path_str = String::Concat(String::New("\\\\"), String::New(path + 8)); - } else if (memcmp(path, "\\\\?\\", 4) == 0) { + } else if (strncmp(path, "\\\\?\\", 4) == 0) { path_str = String::New(path + 4); } else { path_str = String::New(path);