Make signing fail if a too small buffer is passed.

Bug discovered by Sergio Demian Lerner.
Merge pull request #169

603c33b Make signing fail if a too small buffer is passed. (Pieter Wuille)