[tor-commits] [tor] 03/05: Remove `BUG()` in Windows process read callback.

gitolite role git at cupani.torproject.org
Tue Nov 1 13:16:07 UTC 2022


This is an automated email from the git hooks/post-receive script.

dgoulet pushed a commit to branch main
in repository tor.

commit 75d12dffe707d6861485092e0a87db6384a87252
Author: Alexander Færøy <ahf at torproject.org>
AuthorDate: Tue Nov 1 10:45:17 2022 +0100

    Remove `BUG()` in Windows process read callback.
    
    This BUG() was added when the code was written to see if this callback
    was ever executed after we marked the handle as EOF. It turns out, it
    does, but we handle it gracefully. We can therefore remove the BUG().
    
    Fixes tpo/core/tor#40596.
---
 changes/ticket40596             | 4 ++++
 src/lib/process/process_win32.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/changes/ticket40596 b/changes/ticket40596
new file mode 100644
index 0000000000..13c8e5b34a
--- /dev/null
+++ b/changes/ticket40596
@@ -0,0 +1,4 @@
+  o Minor bugfixes (pluggable transports, windows):
+    - Remove a warning `BUG()` that could occur when attempting to execute a
+      non-existing pluggable transport on Windows. Fixes bug 40596; bugfix on
+      0.4.0.1-alpha.
diff --git a/src/lib/process/process_win32.c b/src/lib/process/process_win32.c
index dfcb17a480..6458f93752 100644
--- a/src/lib/process/process_win32.c
+++ b/src/lib/process/process_win32.c
@@ -888,7 +888,7 @@ process_win32_read_from_handle(process_win32_handle_t *handle,
 
   /* Check if we have been asked to read from a handle that have already told
    * us that we have reached the end of the file. */
-  if (BUG(handle->reached_eof))
+  if (handle->reached_eof)
     return 0;
 
   /* This cast should be safe since our buffer can be at maximum up to

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tor-commits mailing list