Yes,  I think that magic value should be #define at least. But we are just repeating already said in https://github.com/OpenSC/OpenSC/issues/102 :)
(The real motivation here is just fix warning which triggers Coverity static analysis error. Someone who know what the real limit is here should remove that 126 magic completely...)