mtd: clamp ubi name strings
mtd: clamp ubi name strings

Since the length fields with the ubi volnames are signed 16bit values,
make sure we clamp that number to the size of the buffer we've allocated
on the stack to prevent buffer overflows.

* mtd.c (ubi_ioctl): Clamp length to string_quote to 0/UBI_MAX_VOLUME_NAME.
Check the return of string_quote and tweak the output accordingly.

kapdop/android_external_strace,lkundrak/strace,DirtyUnicorns/android_external_strace,TeamExodus/external_strace,lkundrak/strace,geekboxzone/lollipop_external_strace,TeamExodus/external_strace,geekboxzone/lollipop_external_strace,vrastogi/strace,xin3liang/platform_external_strace,Distrotech/strace,Yu-AndroidM/android_external_strace,xin3liang/platform_external_strace,bnoordhuis/strace,Yu-AndroidM/android_external_strace,geekboxzone/lollipop_external_strace,geekboxzone/mmallow_external_strace,YUPlayGodDev/platform_external_strace,Yu-AndroidM/android_external_strace,DirtyUnicorns/android_external_strace,geekboxzone/mmallow_external_strace,Saruta/strace,bigzz/strace_android,MonkeyZZZZ/platform_external_strace,geekboxzone/mmallow_external_strace,MonkeyZZZZ/platform_external_strace,Infinitive-OS/platform_external_strace,geekboxzone/mmallow_external_strace,bnoordhuis/strace,xin3liang/platform_external_strace,android-ia/platform_external_strace,CyanogenMod/android_external_strace,MonkeyZZZZ/platform_external_strace,YUPlayGodDev/platform_external_strace,vrastogi/strace,Infinitive-OS/platform_external_strace,lkundrak/strace,Saruta/strace,bigzz/strace_android,Distrotech/strace,bnoordhuis/strace,AOSP-YU/platform_external_strace,YUPlayGodDev/platform_external_strace,TeamExodus/external_strace,geofft/strace,geofft/strace,android-ia/platform_external_strace,geofft/strace,Infinitive-OS/platform_external_strace,cuviper/strace,vrastogi/strace,kapdop/android_external_strace,DirtyUnicorns/android_external_strace,Distrotech/strace,MonkeyZZZZ/platform_external_strace,Infinitive-OS/platform_external_strace,Yu-AndroidM/android_external_strace,vrastogi/strace,YUPlayGodDev/platform_external_strace,xin3liang/platform_external_strace,Yu-AndroidM/android_external_strace,Saruta/strace,DirtyUnicorns/android_external_strace,TeamExodus/external_strace,android-ia/platform_external_strace,geofft/strace,android-ia/platform_external_strace,CyanogenMod/android_external_strace,bigzz/strace_android,AOSP-YU/platform_external_strace,CyanogenMod/android_external_strace,vrastogi/strace,pombredanne/strace,TeamExodus/external_strace,geekboxzone/mmallow_external_strace,cuviper/strace,bnoordhuis/strace,Distrotech/strace,kapdop/android_external_strace,lkundrak/strace,android-ia/platform_external_strace,Infinitive-OS/platform_external_strace,Distrotech/strace,pombredanne/strace,geekboxzone/lollipop_external_strace,pombredanne/strace,kapdop/android_external_strace,CyanogenMod/android_external_strace,cuviper/strace,YUPlayGodDev/platform_external_strace,Saruta/strace,pombredanne/strace,cuviper/strace,geekboxzone/lollipop_external_strace,AOSP-YU/platform_external_strace,geofft/strace,cuviper/strace,bigzz/strace_android,DirtyUnicorns/android_external_strace,CyanogenMod/android_external_strace,bigzz/strace_android,AOSP-YU/platform_external_strace,AOSP-YU/platform_external_strace,MonkeyZZZZ/platform_external_strace,Saruta/strace,kapdop/android_external_strace