summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_simpad.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie2/opiecore/device/odevice_simpad.cpp b/libopie2/opiecore/device/odevice_simpad.cpp
index 76f03a0..e62ea18 100644
--- a/libopie2/opiecore/device/odevice_simpad.cpp
+++ b/libopie2/opiecore/device/odevice_simpad.cpp
@@ -355,7 +355,7 @@ bool SIMpad::setDisplayBrightness ( int bright )
355 value = value << 8; 355 value = value << 8;
356 value += mask; 356 value += mask;
357 char writeCommand[100]; 357 char writeCommand[100];
358 const int count = sprintf( writeCommand, "0x%x\n", value ); 358 const int count = snprintf( writeCommand, sizeof(writeCommand), "0x%x\n", value );
359 res = ( ::write ( fd, writeCommand, count ) != -1 ); 359 res = ( ::write ( fd, writeCommand, count ) != -1 );
360 ::close ( fd ); 360 ::close ( fd );
361 } 361 }