jik2:~!1039$ rpm -q netpbm; pbmtext "The quick brown fox jumped over the lazy dogs." | pbmtolj -resolution 600 > /dev/null netpbm-10.28-3 pbmtolj: pbmtolj.c:181: putitem: Assertion `rowBufferIndex < rowBufferSize' failed. Aborted (core dumped) jik2:~!1040$
This issue is caused by an integer overflow in the padding calculation. In some cases (as presented in your example) the padright (unsigned int) variable can reach below zero (-1). Then for (col = 0; col < padright; ++col) putbit(0); will output really MANY bits out...