Skip to contentSkip to conversation

uml: avoid NULL dereference in line.c

PATCH In review [email protected] 1 participant 1 message Jan 13, 2005 User-mode Linux (UML)

lore
Share & tools
lore
#0 lore raw

PATCH 1/8 uml: avoid NULL dereference in line.c

From: Frank Sorenson <[email protected]>

This patch reorders two lines to check a variable for NULL before using the variable.

---

 linux-2.6.11-paolo/arch/um/drivers/line.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
arch/um/drivers/line.c renamed from arch/um/drivers/line.c~uml-reorder_null_check +1 -1
diff -puN arch/um/drivers/line.c~uml-reorder_null_check arch/um/drivers/line.c
@@ -593,8 +593,8 @@ irqreturn_t winch_interrupt(int irq, voi
 		}
 	}
 	tty  = winch->tty;
-	line = tty->driver_data;
 	if (tty != NULL) {
+		line = tty->driver_data;
 		chan_window_size(&line->chan_list,
 				 &tty->winsize.ws_row, 
 				 &tty->winsize.ws_col);

_

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel