[ostree: 3/4] core: Don't insert null byte in temporary file names
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree: 3/4] core: Don't insert null byte in temporary file names
- Date: Thu, 15 Dec 2011 18:45:01 +0000 (UTC)
commit ecbffd4915de598c15764108d2c35b5acf76f8ad
Author: Colin Walters <walters verbum org>
Date: Thu Dec 15 13:10:41 2011 -0500
core: Don't insert null byte in temporary file names
src/libostree/ostree-core.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/libostree/ostree-core.c b/src/libostree/ostree-core.c
index c70ca70..887108f 100644
--- a/src/libostree/ostree-core.c
+++ b/src/libostree/ostree-core.c
@@ -990,7 +990,7 @@ subst_xxxxxx (GRand *rand,
while (*xxxxxx == 'X')
{
- int offset = g_random_int_range (0, sizeof (table));
+ int offset = g_random_int_range (0, sizeof (table) - 1);
*xxxxxx = (guint8)table[offset];
xxxxxx++;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]