|   | 
      | 
  
  
      | 
      | 
  
 
     | 
    | 
  
  
     | 
    | 
  
  
    |   | 
      | 
  
  
    | 
         
xen-changelog
[Xen-changelog] Use MIN instead of MAX to avoid reading more than	fits i
 
# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID 7115d6c6c792b627fc2c561d71c765c5f0812062
# Parent  38312fe7ec38dab85c5ac7158efd776bacb44717
Use MIN instead of MAX to avoid reading more than fits into the buffer.
Signed-off-by: Anthony Liguori <aliguori@xxxxxxxxxx>
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>
diff -r 38312fe7ec38 -r 7115d6c6c792 tools/console/daemon/io.c
--- a/tools/console/daemon/io.c Wed Aug 31 08:27:34 2005
+++ b/tools/console/daemon/io.c Wed Aug 31 08:43:31 2005
@@ -371,7 +371,7 @@
                (struct ring_head *)(dom->page + PAGE_SIZE/2);
        int i;
 
-       len = read(dom->tty_fd, msg, MAX(XENCONS_SPACE(inring), sizeof(msg)));
+       len = read(dom->tty_fd, msg, MIN(XENCONS_SPACE(inring), sizeof(msg)));
        if (len < 1) {
                close(dom->tty_fd);
                dom->tty_fd = -1;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
 |   
 
| <Prev in Thread] | 
Current Thread | 
[Next in Thread> |  
- [Xen-changelog] Use MIN instead of MAX to avoid reading more than	fits into the buffer.,
Xen patchbot -unstable <=
  
 |  
  
 | 
    | 
  
  
    |   | 
    |