[PATCH 012/193] altera-stapl: altera_get_note: prevent write beyond end of 'key'