summaryrefslogtreecommitdiff
path: root/src/udev/libudev-queue-private.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/udev/libudev-queue-private.c')
-rw-r--r--src/udev/libudev-queue-private.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/udev/libudev-queue-private.c b/src/udev/libudev-queue-private.c
index 71771950aa..d3e09e8b27 100644
--- a/src/udev/libudev-queue-private.c
+++ b/src/udev/libudev-queue-private.c
@@ -119,7 +119,7 @@ static int skip_to(FILE *file, long offset)
old_offset = ftell(file);
if (offset > old_offset && offset - old_offset <= BUFSIZ) {
size_t skip_bytes = offset - old_offset;
- char buf[skip_bytes];
+ char *buf = alloca(skip_bytes);
if (fread(buf, skip_bytes, 1, file) != skip_bytes)
return -1;