Skip to content

Instantly share code, notes, and snippets.

@ajengle
Created December 17, 2013 01:59
Show Gist options
  • Save ajengle/7998683 to your computer and use it in GitHub Desktop.
Save ajengle/7998683 to your computer and use it in GitHub Desktop.
Patch for bulk_extractor to prevent hanging when encountering a FIFO pipe.
diff -Naur bulk_extractor/src/dig.cpp bulk_extractor_patch/src/dig.cpp
--- bulk_extractor/src/dig.cpp 2013-12-16 19:26:03.800142268 -0500
+++ bulk_extractor_patch/src/dig.cpp 2013-12-16 19:59:57.636177687 -0500
@@ -163,6 +163,9 @@
if(stat(pathname.c_str(),&st)){
continue; // can't stat it
}
+ if(S_ISFIFO(st.st_mode)) {
+ continue; // we have a FIFO pipe; don't process it
+ }
#endif
dig::const_iterator::devinode di(st.st_dev,st.st_ino);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment