Hi and welcome to Pentax forums.
I presume this is happening only in images you view in PEF/DNG RAW format, and then save to JPG for example, rather than JPG's straight out of camera?
If yes, it is an issue of that black bar appearing in your DNG/PEF RAW output, there is nothing to worry about. A quick search on these forums would reveal many K-x users have pointed out this and similar issues before, including myself after I first bought my K-x last year
https://www.pentaxforums.com/forums/pentax-dslr-discussion/77534-k-x-dng-outp...-band-rhs.html
The solution is to update your image viewing application. Early versions of Picasa for example didn't know how to handle (ie mask off) those sections of the PEF/DNG output. But any up-to-date image management software (Adobe Lightroom past 2.6, Adobe Elements 8, ACR, FastStone etc) know how to display K-x PEF/DNG's properly.