Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Cleanup and sanity-checking of OOB accesses and pointer-to-local issues (Coverity...
[palacios.git] / palacios / src / devices / telnet_cons.c
index be40ba4..5f82993 100644 (file)
@@ -217,7 +217,7 @@ static const uint8_t bg_color_map[] = {
 static int send_update(struct cons_state * state, uint8_t  x, uint8_t  y, uint8_t attrib, uint8_t val) {
     uint8_t fg_color = fg_color_map[(attrib & 0x0f) % 16];
     uint8_t bg_color = bg_color_map[(attrib & 0xf0) % 16];
-    uint8_t buf[32];
+    uint8_t buf[64];
     int ret = 0;
     int i = 0;
 
@@ -264,7 +264,7 @@ static int send_update(struct cons_state * state, uint8_t  x, uint8_t  y, uint8_
        uint64_t start, end;
 
        rdtscll(start);
-       ret =  send_all(state->client_fd, buf, 32);
+       ret =  send_all(state->client_fd, buf, i);
        rdtscll(end);
 
        PrintDebug(VM_NONE, VCORE_NONE, "Sendall latency=%d cycles\n", (uint32_t)(end - start));