From: olh@suse.de Date: Sat, 3 Jul 2004 01:59:30 +0000 (-0700) Subject: [PATCH] allow NAME_SIZE > SYSFS_PATH_MAX X-Git-Tag: 029~1 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=cf9ffc8d9c02553b9698a795f26208fc121c8f1a;ds=sidebyside [PATCH] allow NAME_SIZE > SYSFS_PATH_MAX NAME_SIZE is too small for some configurations. This patch allows more or longer names, it just keeps the stack in a sane state. --- diff --git a/udevdb.c b/udevdb.c index f24693671..c4dc4f005 100644 --- a/udevdb.c +++ b/udevdb.c @@ -52,7 +52,7 @@ int udevdb_add_dev(const char *path, const struct udevice *dev) if ((path == NULL) || (dev == NULL)) return -ENODEV; - memset(keystr, 0, NAME_SIZE); + memset(keystr, 0, SYSFS_PATH_MAX); strfieldcpy(keystr, path); key.dptr = keystr; key.dsize = strlen(keystr) + 1;