Hi,
While running your changed tests on Windows, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at
http://testbot.winehq.org/JobDetails.pl?Key=23015
Your paranoid android.
=== WNT4WSSP6 (32 bit) ===
batch.c:312: Test failed: unexpected char 0x68 position 0 in line 860 (got 'h=%h i=a j=b k=c l=e m= o=%o', wanted 'h=%h i=a j=b k=c l=e m=%m o=%o')
batch.c:312: Test failed: unexpected char 0x68 position 0 in line 862 (got 'h=%h i=a j=b k=c l=d e f g m= n=%n o=%o', wanted 'h=%h i=a j=b k=c l=d e f g m=%m n=%n o=%o')
batch.c:312: Test failed: unexpected char 0x68 position 0 in line 863 (got 'h=%h i=a j=c k= l= m= n=%n o=%o', wanted 'h=%h i=a j=c k= l= m=%m n=%n o=%o')
batch.c:312: Test failed: unexpected char 0x68 position 0 in line 864 (got 'h=%h i=b j=c k= l= m= n=%n o=%o', wanted 'h=%h i=b j=c k= l= m=%m n=%n o=%o')
batch.c:312: Test failed: unexpected char 0x68 position 0 in line 865 (got 'h=%h i=b j=c k= l= m= n=%n o=%o', wanted 'h=%h i=b j=c k= l= m=%m n=%n o=%o')
Hi,
While running your changed tests on Windows, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at
http://testbot.winehq.org/JobDetails.pl?Key=23014
Your paranoid android.
=== WNT4WSSP6 (32 bit) ===
batch.c:312: Test failed: unexpected char 0x68 position 0 in line 860 (got 'h=%h i=a j=b k=c l=e m= o=%o', wanted 'h=%h i=a j=b k=c l=e m=%m o=%o')
batch.c:312: Test failed: unexpected char 0x68 position 0 in line 862 (got 'h=%h i=a j=b k=c l=d e f g m= n=%n o=%o', wanted 'h=%h i=a j=b k=c l=d e f g m=%m n=%n o=%o')
batch.c:312: Test failed: unexpected char 0x68 position 0 in line 863 (got 'h=%h i=a j=c k= l= m= n=%n o=%o', wanted 'h=%h i=a j=c k= l= m=%m n=%n o=%o')
batch.c:312: Test failed: unexpected char 0x68 position 0 in line 864 (got 'h=%h i=b j=c k= l= m= n=%n o=%o', wanted 'h=%h i=b j=c k= l= m=%m n=%n o=%o')
batch.c:312: Test failed: unexpected char 0x68 position 0 in line 865 (got 'h=%h i=b j=c k= l= m= n=%n o=%o', wanted 'h=%h i=b j=c k= l= m=%m n=%n o=%o')
+ * write_console_input
+ *
+ * Helper function for bare_console_fetch_input calling WriteConsoleInput
+ * The handle passed to ReadConsole etc may not have been opened for write,
+ * and hence the calls to WriteConsoleInput may fail. This routine handles such
+ * a failure, and retries the write by opening the console for write, using
+ * it and then closing it again.
+ *
+ * Returns as per WriteConsoleInputW (TRUE on success)
+ */
+BOOL WINAPI write_console_input( HANDLE handle, const INPUT_RECORD *buffer,
+ DWORD count, LPDWORD written )
+{
+ BOOL result = WriteConsoleInputW(handle, buffer, count, written);
+
+ /* If this fails with access denied */
+ if (!result && GetLastError() == ERROR_ACCESS_DENIED) {
+ HANDLE hConRW = CreateFileW(coninW, GENERIC_READ | GENERIC_WRITE,
+ FILE_SHARE_READ, NULL, OPEN_EXISTING,
+ FILE_ATTRIBUTE_NORMAL, 0);
+ if (hConRW != INVALID_HANDLE_VALUE) {
+ result = WriteConsoleInputW(hConRW, buffer, count, written);
+ CloseHandle(hConRW);
+ }
+ }
+
+ return result;
+}
Hi Jason,
That would be better to use 4 spaces identation as the rest of the file.
Christian
You should at least look at the stream and check that it looks like an
image in a format the decoder can read.
For PNG, you could maybe argue that given a correct magic number and a
correctly-working decoder, the decoder must be able to read all the
images or either the decoder or image is broken. Then again, you're
not even checking the magic number..
For TGA, though, we don't have an exact magic number. It's entirely
possible that we our TGA magic number matches some files that aren't
really TGA images but are images in some other format that we can
decode. We need QueryCapabilities to disambiguate the decoders in
these cases.
For JPEG and TIFF, which are extensible formats, there's also the
possibility that an image has something in it that we don't support
(and that the corresponding decoder on Windows doesn't support) but
some other decoder on the system can.
The method should also invalidate the decoder object, so we don't
accidentally introduce code that reuses it.
On Sat, Nov 17, 2012 at 9:28 PM, Marcus Meissner <meissner(a)suse.de> wrote:
> Hi,
>
> If we have multiple filenames on the commandline, and the second one is -,
> we would fclose(stdin) as realname is not NULL.
>
> (And also double free realname.)
>
> So set it back to NULL after free and in the stdin case.
>
> Ciao, Marcus
> ---
> programs/regedit/regedit.c | 1 +
> 1 Datei geändert, 1 Zeile hinzugefügt(+)
>
> diff --git a/programs/regedit/regedit.c b/programs/regedit/regedit.c
> index acff701..b6f74ee 100644
> --- a/programs/regedit/regedit.c
> +++ b/programs/regedit/regedit.c
> @@ -143,6 +143,7 @@ static BOOL PerformRegAction(REGEDIT_ACTION action, LPSTR s)
> if (strcmp(filename, "-") == 0)
> {
> reg_file = stdin;
> + realname = NULL;
> }
> else
> {
realname is set to NULL at the start of every iteration, so this is not useful.
Frédéric