mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 03:01:26 +00:00
Erik Habbinga <erikhabbinga@inphase-tech.com>
I've seen a case where TRACE_BUFFER is called with a NULL buffer pointer. This patch adds a check to debug_print_buffer in scst_debug.c to avoid dereferencing any incoming NULL pointers. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@43 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -57,6 +57,9 @@ void debug_print_buffer(const void *data, int len)
|
||||
int f = 0;
|
||||
unsigned long flags;
|
||||
|
||||
if (buf == NULL)
|
||||
return;
|
||||
|
||||
spin_lock_irqsave(&trace_buf_lock, flags);
|
||||
|
||||
PRINT(NO_FLAG, " (h)___0__1__2__3__4__5__6__7__8__9__A__B__C__D__E__F");
|
||||
|
||||
Reference in New Issue
Block a user