[PATCH] msi: check return value of msi_string2idW (Coverity)
Marcus Meissner
meissner at suse.de
Tue Aug 30 11:17:21 CDT 2011
return value is checked for all other calls, so check it
here too. CID 5283
---
dlls/msi/streams.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/msi/streams.c b/dlls/msi/streams.c
index 56b38e3..71616e9 100644
--- a/dlls/msi/streams.c
+++ b/dlls/msi/streams.c
@@ -296,10 +296,12 @@ static UINT STREAMS_get_column_info( struct tagMSIVIEW *view, UINT n, LPCWSTR *n
static UINT streams_find_row(MSISTREAMSVIEW *sv, MSIRECORD *rec, UINT *row)
{
LPCWSTR str;
- UINT i, id, data;
+ UINT r, i, id, data;
str = MSI_RecordGetString(rec, 1);
- msi_string2idW(sv->db->strings, str, &id);
+ r = msi_string2idW(sv->db->strings, str, &id);
+ if (r != ERROR_SUCCESS)
+ return r;
for (i = 0; i < sv->num_rows; i++)
{
--
1.7.1
More information about the wine-patches
mailing list