Hacker GitHub

← All repos

google/wuffs

View on GitHub ↗ ★ 4,874 C

Wrangling Untrusted File Formats Safely

121 mentions on Hacker News by 76 people: 18 stories, 103 comments · first 2017-11-16 · latest 2026-10-29

Mentions per year 121 mentions · busiest year 2021 (28)
20082026
  1. ▲ 1
    Ask HN: Wuffs Examples for Text Files?
    story by dalke · 2023-05-22 · 0 comments
  2. …a little language that had super-good performance, C might be a good choice. (See also, [Wuffs]( https://github.com/google/wuffs ), by Nigel Tao et al at Google). A suggestion, if you do target C -- don't work too hard to find isomorphisms…
    comment by drchase · 2023-05-07 · in FaaS in Go with WASM, WASI and Rust
  3. Reminds me a bit of WUFFS ( https://github.com/google/wuffs ), although a bit more structured (or high level)
  4. That sounds a bit like what WUFFS is doing WUFFS: https://github.com/google/wuffs
    comment by ck45 · 2022-12-22 · in Checked C
  5. …compiler to prove the addition wouldn’t overflow. Wuffs is specialized enough to do exactly that ( https://github.com/google/wuffs ).
  6. That's how WUFFS (Wrangling Untrusted File Formats Safely) works: https://github.com/google/wuffs#what-does-compile-time-check...
    comment by nigeltao · 2022-11-30 · in How much does Rust's bounds checking cost?
  7. …Wuffs, a language focused on writing safe file format handlers (parsing, encoding, decoding) https://github.com/google/wuffs
  8. …panics on this line In WUFFS foo[k] doesn't compile, variable k is the wrong type for indexing foo. https://github.com/google/wuffs/blob/main/doc/wuffs-the-lang... Now, WUFFS is not a general purpose programming language. You should not…
    comment by tialaramex · 2022-11-06 · in Two years of fiddling with Rust
  9. There might be a few others. https://github.com/google/wuffs for example isn't general purpose or mainstream, but it's meant to solve practical problems, so I don't think I'd call it a research language. Opinions may vary.
    comment by scottlamb · 2022-11-06 · in Two years of fiddling with Rust
  10. Here's another SIMD implementation, with commentary: https://github.com/google/wuffs/blob/main/std/adler32/common... Like the fpng implementation, it's SSE (128-bit registers), but the inner loop eats 32 bytes at a time, not 16. "Wuffs’…
    comment by nigeltao · 2022-08-08 · in Computing Adler32 Checksums at 41 GB/s
  11. > Programing languages require precedence rules WUFFS doesn't have operator precedence. https://github.com/google/wuffs/blob/main/doc/wuffs-the-lang... As its designers explain: A bare a * b + c is an invalid expression. You must…
  12. [WUFFS]( https://github.com/google/wuffs ) is made for stuff like this, and it has a library available as transpiled C code.
    comment by SAI_Peregrinus · 2022-07-31 · in New Ghostscript PDF interpreter
  13. …should never happen as a result of processing a PDF. This is the purpose of languages like WUFFS: https://github.com/google/wuffs You can't write a WUFFS program to, for example, email anything to crooks@example.com even if you desperately…
    comment by tialaramex · 2022-07-06 · in A fake job offer took down Axie Infinity
  14. This sort of stuff is where Iterate Loops are good: https://github.com/google/wuffs/blob/main/doc/note/iterate-l... WUFFS wants this because it demands all the checking at compile time (WUFFS code with a potential buffer overflow just…
    comment by tialaramex · 2022-06-28 · in tolower() in bulk at speed
  15. …aimed at efficiently and safely parsing document structure. There is a PNG decoder [2]. 1. https://github.com/google/wuffs 2. https://news.ycombinator.com/item?id=26714831
  16. …targeting these specific problems; that they'd consider Rust isn't just because "it's there". [1] https://github.com/google/wuffs
    comment by riwsky · 2022-06-22 · in Experimenting with Rust in Chromium
  17. …unrolled loops nicely is a nice performance-not-safety feature of WUFFS called "Iterate loops": https://github.com/google/wuffs/blob/main/doc/note/iterate-l... Well, I say performance not safety, as always they want both, but you could…
    comment by tialaramex · 2022-06-16 · in How fast can a 6502 transfer memory?
  18. For anyone curious: https://github.com/google/wuffs
    comment by eru · 2022-06-13 · in Data Race Patterns in Go
  19. Wuffs[1] is an alternative that also supports generating the binary file. [1] https://github.com/google/wuffs
    comment by janjones · 2022-04-03 · in Kaitai, binary format parsing web IDE
  20. Indeed, you should be Wrangling Untrusted File Formats Safely https://github.com/google/wuffs
  21. I agree that it's similar but ultimately different problems. Copy/pasting from https://github.com/google/wuffs/blob/main/doc/related-work.m... gives: > Kaitai Struct is in a similar space, generating safe parsers for multiple target…
  22. …and fast programming language made by Google specifically for decoding and encoding file formats https://github.com/google/wuffs Paired with C FFI available in most languages, this seems like the nicer solution. It's simpler than…
  23. …even in principle express the programs that should not exist, that's exactly what WUFFS is for. https://github.com/google/wuffs This sort of bug can't happen in WUFFS because you can't express the idea "corrupt the heap memory" even if you…
  24. …I think, but am not sure, this is what the experimental parsing language 'wuffs' is about https://github.com/google/wuffs -- the language itself is aware of array lengths as a first-class citizen and can make decisions accordingly
    comment by awinter-py · 2021-12-23 · in Three Minor Features in Go 1.18
  25. https://github.com/google/wuffs
  26. …deleted code is even safer than Rust. Apart from Rust, Wuffs is also a good candidate for codecs: https://github.com/google/wuffs/blob/main/doc/wuffs-the-lang... Too bad that Swift isn't that good for low-level codecs, so a Swift rewrite…
  27. If you must Wrangle Untrusted File Formats you should do so Safely: https://github.com/google/wuffs
  28. I thought this post was one long gag until I found WUFFS on GitHub: https://github.com/google/wuffs
    comment by jdblair · 2021-08-29 · in Hell Is Other REPLs
  29. For a codec, WUFFS might be a better fit than Rust. https://github.com/google/wuffs In Rust, if I have two u8 variables and I add them together, Rust will try to figure out if it's sure at compile time that this is an overflow and if so…
    comment by tialaramex · 2021-07-16 · in Is Rust Used Safely by Software Developers?
  30. ▲ 2
    Google Wuffs
    story by tosh · 2021-06-30 · 1 comment
  31. I don't agree. Consider WUFFS https://github.com/google/wuffs WUFFS will give you a C library that can turn PNG data into raw image data and is definitely correct. It's not exactly idiomatic C, you'd assume if a person wrote this code it's…
    comment by tialaramex · 2021-06-27 · in CompCert – Formally-verified C compiler
  32. …It's a Google project, and I wouldn't be surprised if it eventually makes its way into Chrome. https://github.com/google/wuffs
    comment by vinkelhake · 2021-06-13 · in A few thoughts on Fuchsia security
  33. …finds out the hard way. Now, on one hand you've got a simple image viewer built with WUFFS: https://github.com/google/wuffs which you are completely sure is safe for viewing the images, you could perhaps glance at a hundred images per…
  34. …you certainly can't be sure of that, none of the tools you use have such a cautious approach. † https://github.com/google/wuffs
    comment by tialaramex · 2021-05-14 · in Using Rust Macros to exfiltrate secrets
  35. ▲ 1
    Wuffs (Programming Language) – Wrangling Untrusted File Formats Safely
    story by peter_d_sherman · 2021-04-09 · 5 comments
  36. …aspect for a reliable language, it wasn't immediately clear from the docs. Edit ah found it, https://github.com/google/wuffs/blob/main/doc/note/statuses....
    comment by mkj · 2021-04-09 · in Wuffs the Language
  37. …JSON is a pretty simple spec and this obscures it (although to be fair it's also handling UTF-8). https://github.com/google/wuffs/blob/main/std/json/decode_js... Yes it prevents buffer overflows and integer overflow, but it can't prevent…
    comment by chubot · 2021-04-08 · in Wuffs the Language
  38. > I'm curious if it is at all competitive with the Wuffs decoder You could try adapting https://github.com/google/wuffs/tree/main/script/bench-rust-... > https://github.com/bschwind/png-decoder Note that statements like: let…
    comment by nigeltao · 2021-04-08 · in Wuffs’ PNG image decoder
  39. …portability and safe languages. (There may be some contorted way to have Rust emit C, too.) [0]: https://github.com/google/wuffs
  40. ▲ 187
    Wuffs the Language
    story by bshanks · 2021-04-07 · 75 comments
  41. …[1] is rarely used in C projects to parse untrusted data given that it can be translated to C. [1] https://github.com/google/wuffs
  42. The README on GitHub looks useful: https://github.com/google/wuffs
    comment by chmaynard · 2021-04-07 · in Wuffs’ PNG image decoder
  43. ▲ 3
    Wuffs (Wrangling Untrusted File Formats Safely)
    story by pjmlp · 2021-04-07 · 0 comments
  44. …like there isn't an encoder for PNG There isn't one yet, but I'd like to have one at some point. https://github.com/google/wuffs/blob/main/doc/roadmap.md
    comment by nigeltao · 2021-04-07 · in Wuffs’ PNG image decoder
  45. …that. I'm not sure exactly what you're asking for, but see the Coroutines, Effects and I/O pages in https://github.com/google/wuffs/tree/main/doc/note
    comment by nigeltao · 2021-04-07 · in Wuffs’ PNG image decoder
  46. Wuffs does not use a SMT solver. https://github.com/google/wuffs/blob/main/doc/note/assertion... explains.
    comment by sanxiyn · 2021-04-07 · in Wuffs’ PNG image decoder
  47. …(like Rust) or add reference counting (like Rust `Arc`, C++ `shared_ptr`, Golang, Java, etc). [0] https://github.com/google/wuffs/blob/v0.3.0-beta.1/doc/note/...
    comment by mleonhard · 2021-04-06 · in Wuffs’ PNG image decoder
  48. ▲ 2
    WUFFs Project and Language: Wrangling Untrusted File Formats Safely
    story by andrewla · 2021-04-06 · 0 comments
  49. Looks like there isn't an encoder for PNG: https://github.com/google/wuffs/tree/main/std/png Given the project goals, I guess most encoders don't make a lot of sense: For image encoding you basically provide an "x * y * bytes_per_pixel"…
    comment by dividuum · 2021-04-06 · in Wuffs’ PNG image decoder
  50. …First time I've head of Wuffs. As someone that still uses C, this in particular sounds neat: (from https://github.com/google/wuffs#goals-and-non-goals ) """ Wuffs' goal is to produce software libraries that are as safe as Go or Rust,…
    comment by dividuum · 2021-04-06 · in Wuffs’ PNG image decoder