diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | xf86drm.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index e0597c35..39973b62 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -61,7 +61,7 @@ LT_PREREQ([2.2]) | |||
61 | LT_INIT([disable-static]) | 61 | LT_INIT([disable-static]) |
62 | 62 | ||
63 | 63 | ||
64 | PKG_CHECK_MODULES(PTHREADSTUBS, pthread-stubs) | 64 | |
65 | AC_SUBST(PTHREADSTUBS_CFLAGS) | 65 | AC_SUBST(PTHREADSTUBS_CFLAGS) |
66 | AC_SUBST(PTHREADSTUBS_LIBS) | 66 | AC_SUBST(PTHREADSTUBS_LIBS) |
67 | 67 | ||
@@ -2929,11 +2929,11 @@ static int drmParsePciBusInfo(int maj, int min, drmPciBusInfoPtr info) | |||
2929 | if (fd < 0) | 2929 | if (fd < 0) |
2930 | return -errno; | 2930 | return -errno; |
2931 | 2931 | ||
2932 | ret = read(fd, data, sizeof(data)); | 2932 | ret = read(fd, data, sizeof(data)-1); |
2933 | data[sizeof(data)-1] = '\0'; | ||
2934 | close(fd); | 2933 | close(fd); |
2935 | if (ret < 0) | 2934 | if (ret < 0) |
2936 | return -errno; | 2935 | return -errno; |
2936 | data[ret] = '\0'; | ||
2937 | 2937 | ||
2938 | #define TAG "PCI_SLOT_NAME=" | 2938 | #define TAG "PCI_SLOT_NAME=" |
2939 | str = strstr(data, TAG); | 2939 | str = strstr(data, TAG); |