aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Girlin <[email protected]>2013-05-24 16:24:09 +0400
committerVadim Girlin <[email protected]>2013-05-24 16:40:58 +0400
commitd1e0dc62752d3dd0ed7909cda6a4380e2ab8695b (patch)
treecc7cc45625c42836582978c991700d40efc9df56
parentb1797c3a3867ab60419bb9ec13dd9cb842edcbe3 (diff)
r600g/sb: fix buffer overflow in sb_ostream
Fixes segfault during bytecode dump with bfgminer kernel Signed-off-by: Vadim Girlin <[email protected]>
-rw-r--r--src/gallium/drivers/r600/sb/sb_bc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/sb/sb_bc.h b/src/gallium/drivers/r600/sb/sb_bc.h
index 8b932634c55..6e73b418d23 100644
--- a/src/gallium/drivers/r600/sb/sb_bc.h
+++ b/src/gallium/drivers/r600/sb/sb_bc.h
@@ -92,7 +92,7 @@ public:
sb_ostream& operator <<(double d) {
char b[32];
- sprintf(b, "%f", d);
+ snprintf(b, 32, "%g", d);
return *this << b;
}