From bcb6095f1f98fb641ff8f8f310fa7970d7e55803 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 15 Jul 2016 17:47:00 -0600 Subject: [PATCH] Add an assertion --- fs/vfs/fs_open.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/vfs/fs_open.c b/fs/vfs/fs_open.c index 08a3f24f64..a66f62e869 100644 --- a/fs/vfs/fs_open.c +++ b/fs/vfs/fs_open.c @@ -260,6 +260,7 @@ int open(const char *path, int oflags, ...) */ fd = (int)OPEN_GETFD(ret); + DEBUGASSERT((unsigned)fd < (CONFIG_NFILE_DESCRIPTORS + CONFIG_NSOCKET_DESCRIPTORS)); } #endif