Module: wine Branch: master Commit: 2b2fa04ca4b89c221419ecd1c7a310f77ca93cbe URL: http://source.winehq.org/git/wine.git/?a=commit;h=2b2fa04ca4b89c221419ecd1c7...
Author: Hans Leidekker hans@codeweavers.com Date: Wed Sep 29 09:58:02 2010 +0200
msi: Always check the return value of msi_string2idW.
---
dlls/msi/join.c | 6 ++++-- dlls/msi/storages.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/dlls/msi/join.c b/dlls/msi/join.c index f787c30..5e11577 100644 --- a/dlls/msi/join.c +++ b/dlls/msi/join.c @@ -225,10 +225,12 @@ static UINT JOIN_get_column_info( struct tagMSIVIEW *view, static UINT join_find_row( MSIJOINVIEW *jv, MSIRECORD *rec, UINT *row ) { LPCWSTR str; - UINT i, id, data; + UINT r, i, id, data;
str = MSI_RecordGetString( rec, 1 ); - msi_string2idW( jv->db->strings, str, &id ); + r = msi_string2idW( jv->db->strings, str, &id ); + if (r != ERROR_SUCCESS) + return r;
for (i = 0; i < jv->rows; i++) { diff --git a/dlls/msi/storages.c b/dlls/msi/storages.c index 3e88874..56f252f 100644 --- a/dlls/msi/storages.c +++ b/dlls/msi/storages.c @@ -334,10 +334,12 @@ static UINT STORAGES_get_column_info(struct tagMSIVIEW *view, UINT n, static UINT storages_find_row(MSISTORAGESVIEW *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++) {