Marcus Meissner : mshtml: Adjusted some incorrect sizeofs (Coverity).

Alexandre Julliard julliard at winehq.org
Tue Oct 18 12:56:28 CDT 2011


Module: wine
Branch: master
Commit: 59fc063a349a2a10187077dd7404a3d873dd1781
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=59fc063a349a2a10187077dd7404a3d873dd1781

Author: Marcus Meissner <meissner at suse.de>
Date:   Tue Oct 18 05:05:51 2011 +0200

mshtml: Adjusted some incorrect sizeofs (Coverity).

---

 dlls/mshtml/htmlelemcol.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/mshtml/htmlelemcol.c b/dlls/mshtml/htmlelemcol.c
index b5dbc0f..c1187a6 100644
--- a/dlls/mshtml/htmlelemcol.c
+++ b/dlls/mshtml/htmlelemcol.c
@@ -61,7 +61,7 @@ static void elem_vector_add(elem_vector_t *buf, HTMLElement *elem)
 {
     if(buf->len == buf->size) {
         buf->size <<= 1;
-        buf->buf = heap_realloc(buf->buf, buf->size*sizeof(HTMLElement**));
+        buf->buf = heap_realloc(buf->buf, buf->size*sizeof(HTMLElement*));
     }
 
     buf->buf[buf->len++] = elem;
@@ -73,7 +73,7 @@ static void elem_vector_normalize(elem_vector_t *buf)
         heap_free(buf->buf);
         buf->buf = NULL;
     }else if(buf->size > buf->len) {
-        buf->buf = heap_realloc(buf->buf, buf->len*sizeof(HTMLElement**));
+        buf->buf = heap_realloc(buf->buf, buf->len*sizeof(HTMLElement*));
     }
 
     buf->size = buf->len;
@@ -530,7 +530,7 @@ IHTMLElementCollection *create_all_collection(HTMLDOMNode *node, BOOL include_ro
 {
     elem_vector_t buf = {NULL, 0, 8};
 
-    buf.buf = heap_alloc(buf.size*sizeof(HTMLElement**));
+    buf.buf = heap_alloc(buf.size*sizeof(HTMLElement*));
 
     if(include_root)
         elem_vector_add(&buf, elem_from_HTMLDOMNode(node));




More information about the wine-cvs mailing list