CodeReviewGeneric

Review for Bugs

Find bugs in code before they ship

Prompt

Review this code for bugs. Focus on: 1. Logic errors — does the code actually do what it claims? 2. Edge cases — empty inputs, null values, boundary conditions 3. Off-by-one errors 4. Race conditions or concurrency issues 5. Resource leaks (connections, file handles, memory) For each issue found, show the problematic line and the fix. [paste code]