GNOME Bugzilla – Bug 762202
g_win32_error_message improvements
Last modified: 2016-03-15 10:37:50 UTC
Small patches improving g_win32_error_message()
Created attachment 321520 [details] [review] win32: fix off-by-one length check Laszlo Ersek said: "The length check is off by one (in the safe direction); it should be (nchars >= 2). The processing should be active for the wide string L"\r\n" -- resulting in the empty wide string --, I believe." Reported-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Created attachment 321521 [details] [review] win32: use wcslen() return type Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Created attachment 321522 [details] [review] win32: fix indentation Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Created attachment 321523 [details] [review] win32: use wide-char for constants Use the appropriate type for comparisons and assignment of wide chars. Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Review of attachment 321520 [details] [review]: ok
Review of attachment 321521 [details] [review]: sure
Review of attachment 321522 [details] [review]: ok
Review of attachment 321523 [details] [review]: ok
The following fixes have been pushed: 37ebc83 win32: use wide-char for constants 6227486 win32: fix indentation 5be8cab win32: use wcslen() return type a1bcd1e win32: fix off-by-one length check
Created attachment 323957 [details] [review] win32: use wide-char for constants Use the appropriate type for comparisons and assignment of wide chars. Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Created attachment 323958 [details] [review] win32: fix indentation Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Created attachment 323959 [details] [review] win32: use wcslen() return type Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Created attachment 323960 [details] [review] win32: fix off-by-one length check Laszlo Ersek said: "The length check is off by one (in the safe direction); it should be (nchars >= 2). The processing should be active for the wide string L"\r\n" -- resulting in the empty wide string --, I believe." Reported-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>