X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fparagraph.c;h=973c580ebbb4c5faac21b389a1e1c347a430b8ac;hp=36e44d860f4a57f822e8a9b3e5f5db5aaef64009;hb=198151f1d58834ff7889389007232a3d250f51f1;hpb=6d3926e16dc1ba6ca0144e65b737e432c48aaa91 diff --git a/palacios/src/devices/paragraph.c b/palacios/src/devices/paragraph.c index 36e44d8..973c580 100644 --- a/palacios/src/devices/paragraph.c +++ b/palacios/src/devices/paragraph.c @@ -247,7 +247,7 @@ static int register_dev(struct paragraph_state *state) target_size = state->mem_size; break; case GCONS_DIRECT: - target_size = state->target_spec.height*state->target_spec.width*state->target_spec.bytes_per_pixel; + target_size = (uint64_t)state->target_spec.height*state->target_spec.width*state->target_spec.bytes_per_pixel; break; default: PrintError(state->vm, VCORE_NONE, "paragraph: Unknown mode\n"); @@ -344,7 +344,7 @@ static int render_callback(v3_graphics_console_t cons, PrintDebug(state->vm, VCORE_NONE, "paragraph: render callback GCONS_MEM\n"); void *fb = v3_graphics_console_get_frame_buffer_data_rw(state->host_cons,&(state->target_spec)); - uint64_t target_size = state->target_spec.height*state->target_spec.width*state->target_spec.bytes_per_pixel; + uint64_t target_size = (uint64_t)state->target_spec.height*state->target_spec.width*state->target_spec.bytes_per_pixel; // must be smaller than the memory we have allocated target_size = target_sizemem_size ? target_size : state->mem_size;