# std.zig: fix integer overflows during parsing · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/4aa8462cc936820bc2c81ea1f3cfc613ff07a9f7)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 4aa8462cc936820bc2c81ea1f3cfc613ff07a9f7

Requested commit: 4aa8462cc936820bc2c81ea1f3cfc613ff07a9f7

Commit: 4aa8462cc936820bc2c81ea1f3cfc613ff07a9f7

Tree: c212d3075ca486bda7ff85dee8ab11208fb02828

Author: travisstaloch

Committer: GitHub

## Message

```
std.zig: fix integer overflows during parsing

these were found while fuzzing zls.

this patch prevents overflow for the following file contents and adds
tests for them.
	* `enum(u32)` - causes overflow in std.zig.Ast.fullContainerDecl()
	* `*x` - causes overflow in std.zig.Ast.fullPtrType()
	* `**x` - causes overflow in std.zig.Ast.firstToken()
```

## Parents

- [3a1295cd6f53c47e3d4eb7bd11b7b177faa66386](https://git.cafe/gitcafe/zig/commit/3a1295cd6f53c47e3d4eb7bd11b7b177faa66386?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/4aa8462cc936820bc2c81ea1f3cfc613ff07a9f7?format=markdown)
