diff options
author | cjihrig <cjihrig@gmail.com> | 2018-12-16 14:18:16 -0500 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2018-12-19 09:02:22 -0500 |
commit | 728b155870b69a83b806d8bee67aeb0fd0a9b2dd (patch) | |
tree | a15ca72c0ac6a6edd66f0845aa7779e0bbbea1f3 /deps/uv/src/unix/linux-inotify.c | |
parent | e1ab457490925ddbf9f234973c4338bd0690acb5 (diff) | |
download | android-node-v8-728b155870b69a83b806d8bee67aeb0fd0a9b2dd.tar.gz android-node-v8-728b155870b69a83b806d8bee67aeb0fd0a9b2dd.tar.bz2 android-node-v8-728b155870b69a83b806d8bee67aeb0fd0a9b2dd.zip |
deps: upgrade to libuv 1.24.1
PR-URL: https://github.com/nodejs/node/pull/25078
Fixes: https://github.com/nodejs/node/issues/24521
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Diffstat (limited to 'deps/uv/src/unix/linux-inotify.c')
-rw-r--r-- | deps/uv/src/unix/linux-inotify.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/deps/uv/src/unix/linux-inotify.c b/deps/uv/src/unix/linux-inotify.c index 7797f84252..9b26202fb3 100644 --- a/deps/uv/src/unix/linux-inotify.c +++ b/deps/uv/src/unix/linux-inotify.c @@ -278,6 +278,7 @@ int uv_fs_event_start(uv_fs_event_t* handle, const char* path, unsigned int flags) { struct watcher_list* w; + size_t len; int events; int err; int wd; @@ -306,12 +307,13 @@ int uv_fs_event_start(uv_fs_event_t* handle, if (w) goto no_insert; - w = uv__malloc(sizeof(*w) + strlen(path) + 1); + len = strlen(path) + 1; + w = uv__malloc(sizeof(*w) + len); if (w == NULL) return UV_ENOMEM; w->wd = wd; - w->path = strcpy((char*)(w + 1), path); + w->path = memcpy(w + 1, path, len); QUEUE_INIT(&w->watchers); w->iterating = 0; RB_INSERT(watcher_root, CAST(&handle->loop->inotify_watchers), w); |