diff options
author | Eric Anholt <eric@anholt.net> | 2007-08-10 17:42:09 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2007-08-10 17:42:09 -0700 |
commit | b7751c7d1d6bcf310824295c3bab4ff36760c791 (patch) | |
tree | 5f71c02de47cdf4c602d9d15e11808af06541e6a | |
parent | cb36635a053d4ac3971fea05060d31dbd3d382d2 (diff) | |
download | xorg-driver-xf86-video-intel-b7751c7d1d6bcf310824295c3bab4ff36760c791.tar.gz |
Fix stack-smashing in the last commit.
-rw-r--r-- | src/i830_memory.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/i830_memory.c b/src/i830_memory.c index 6ba2cd19..15d3a489 100644 --- a/src/i830_memory.c +++ b/src/i830_memory.c @@ -660,7 +660,7 @@ i830_describe_allocations(ScrnInfoPtr pScrn, int verbosity, const char *prefix) "%sMemory allocation layout:\n", prefix); for (mem = pI830->memory_list->next; mem->next != NULL; mem = mem->next) { - char phys_suffix[30] = ""; + char phys_suffix[32] = ""; char *tile_suffix = ""; if (mem->offset >= pI830->stolen_size && @@ -672,7 +672,8 @@ i830_describe_allocations(ScrnInfoPtr pScrn, int verbosity, const char *prefix) } if (mem->bus_addr != 0) - sprintf(phys_suffix, ", 0x%16llx physical\n", mem->bus_addr); + snprintf(phys_suffix, sizeof(phys_suffix), + ", 0x%016llx physical\n", mem->bus_addr); if (mem->tiling == TILE_XMAJOR) tile_suffix = " X tiled"; else if (mem->tiling == TILE_YMAJOR) |