Greg Nutt writes:
Greg Nutt writes:

Attached is a patch for a bug I found in libc/termios/ttyname.c.
Essentially the length of the buffer is calculated incorrectly in a
strncpy call and then the null terminator is placed on the byte after
the buffer.

This probably cause some very strange behavior on my system (it ended up
setting malloc's heapsize to zero) but may be innocuous on other systems.

wbx-github/uclibc-ng,klee/klee-uclibc,hwoarang/uClibc,brgl/uclibc-ng,ChickenRunjyd/klee-uclibc,ysat0/uClibc,foss-xtensa/uClibc,OpenInkpot-archive/iplinux-uclibc,waweber/uclibc-clang,ddcc/klee-uclibc-0.9.33.2,ysat0/uClibc,hjl-tools/uClibc,mephi42/uClibc,wbx-github/uclibc-ng,ndmsystems/uClibc,ndmsystems/uClibc,ysat0/uClibc,atgreen/uClibc-moxie,ddcc/klee-uclibc-0.9.33.2,foss-for-synopsys-dwc-arc-processors/uClibc,ffainelli/uClibc,ddcc/klee-uclibc-0.9.33.2,gittup/uClibc,foss-xtensa/uClibc,skristiansson/uClibc-or1k,klee/klee-uclibc,OpenInkpot-archive/iplinux-uclibc,m-labs/uclibc-lm32,gittup/uClibc,waweber/uclibc-clang,ChickenRunjyd/klee-uclibc,brgl/uclibc-ng,kraj/uClibc,majek/uclibc-vx32,ffainelli/uClibc,mephi42/uClibc,mephi42/uClibc,skristiansson/uClibc-or1k,hwoarang/uClibc,ffainelli/uClibc,brgl/uclibc-ng,ffainelli/uClibc,foss-xtensa/uClibc,kraj/uclibc-ng,majek/uclibc-vx32,ffainelli/uClibc,atgreen/uClibc-moxie,czankel/xtensa-uclibc,gittup/uClibc,ChickenRunjyd/klee-uclibc,czankel/xtensa-uclibc,kraj/uclibc-ng,skristiansson/uClibc-or1k,ddcc/klee-uclibc-0.9.33.2,m-labs/uclibc-lm32,foss-for-synopsys-dwc-arc-processors/uClibc,kraj/uClibc,foss-xtensa/uClibc,kraj/uclibc-ng,czankel/xtensa-uclibc,kraj/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,wbx-github/uclibc-ng,majek/uclibc-vx32,OpenInkpot-archive/iplinux-uclibc,foss-for-synopsys-dwc-arc-processors/uClibc,hjl-tools/uClibc,ChickenRunjyd/klee-uclibc,majek/uclibc-vx32,mephi42/uClibc,klee/klee-uclibc,atgreen/uClibc-moxie,wbx-github/uclibc-ng,ndmsystems/uClibc,waweber/uclibc-clang,gittup/uClibc,m-labs/uclibc-lm32,skristiansson/uClibc-or1k,groundwater/uClibc,m-labs/uclibc-lm32,brgl/uclibc-ng,atgreen/uClibc-moxie,groundwater/uClibc,groundwater/uClibc,kraj/uclibc-ng,hjl-tools/uClibc,ndmsystems/uClibc,czankel/xtensa-uclibc,klee/klee-uclibc,groundwater/uClibc,groundwater/uClibc,ysat0/uClibc,hjl-tools/uClibc,OpenInkpot-archive/iplinux-uclibc,kraj/uClibc,hwoarang/uClibc,hjl-tools/uClibc,hwoarang/uClibc,waweber/uclibc-clang