Automated Program Repair (APR) faces a key challenge in efficiently generating correct patches from a potentially infinite solution space. Existing approaches, which attempt to reason about the entire solution space, can be ineffective (by often producing no plausible patches at all) and imprecise (by often producing plausible but incorrect patches). We present VFix, a new value-flow-guided approach to APR, for fixing null pointer dereferences by considering a substantially reduced solution space in order to greatly increase the number of correct patches generated. By reasoning about the data and control dependences in the program, VFix can identify bug-relevant statements more accurately and generate more correct repairs than before. VFix outperforms the state-of-the-art tools when evaluating 8 existing APR tools using all the NPEs in Defects4j, in terms of both precision (by correctly fixing 3 times as many bugs as the most precise tool and more than 50% the correctly fixed bugs of all these 8 tools altogether) and efficiency (by producing a correct patch in minutes instead of hours).