block: Fix serial number assignment

We should use 'dinfo->serial' length, 'serial' is a pointer, so
the serial number length is currently limited to the pointer size.

This fixes https://bugs.launchpad.net/qemu/+bug/584143 and is also
valid for stable.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
1 file changed
tree: 2b5e6b92e8a952d73cd3d657420a12b5c5eebbeb
  1. audio/
  2. block/
  3. bsd-user/
  4. darwin-user/
  5. default-configs/
  6. docs/
  7. fpu/
  8. fsdev/
  9. gdb-xml/
  10. hw/
  11. linux-user/
  12. net/
  13. pc-bios/
  14. QMP/
  15. roms/
  16. slirp/
  17. sysconfigs/
  18. target-alpha/
  19. target-arm/
  20. target-cris/
  21. target-i386/
  22. target-m68k/
  23. target-microblaze/
  24. target-mips/
  25. target-ppc/
  26. target-s390x/
  27. target-sh4/
  28. target-sparc/
  29. tcg/
  30. tests/
  31. .gitignore
  32. .gitmodules
  33. a.out.h
  34. acl.c
  35. acl.h
  36. aes.c
  37. aes.h
  38. aio.c
  39. alpha-dis.c
  40. alpha.ld
  41. arch_init.c
  42. arch_init.h
  43. arm-dis.c
  44. arm-semi.c
  45. arm.ld
  46. async.c
  47. balloon.c
  48. balloon.h
  49. block-migration.c
  50. block-migration.h
  51. block.c
  52. block.h
  53. block_int.h
  54. blockdev.c
  55. blockdev.h
  56. bswap.h
  57. bt-host.c
  58. bt-host.h
  59. bt-vhci.c
  60. buffered_file.c
  61. buffered_file.h
  62. cache-utils.c
  63. cache-utils.h
  64. Changelog
  65. check-qdict.c
  66. check-qfloat.c
  67. check-qint.c
  68. check-qjson.c
  69. check-qlist.c
  70. check-qstring.c
  71. cmd.c
  72. cmd.h
  73. cocoa.m
  74. CODING_STYLE
  75. config.h
  76. configure
  77. console.c
  78. console.h
  79. COPYING
  80. COPYING.LIB
  81. cpu-all.h
  82. cpu-common.h
  83. cpu-defs.h
  84. cpu-exec.c
  85. cpus.c
  86. cpus.h
  87. create_config
  88. cris-dis.c
  89. curses.c
  90. curses_keys.h
  91. cursor.c
  92. cursor_hidden.xpm
  93. cursor_left_ptr.xpm
  94. cutils.c
  95. d3des.c
  96. d3des.h
  97. def-helper.h
  98. device_tree.c
  99. device_tree.h
  100. dis-asm.h
  101. disas.c
  102. disas.h
  103. dma-helpers.c
  104. dma.h
  105. dyngen-exec.h
  106. elf.h
  107. envlist.c
  108. envlist.h
  109. exec-all.h
  110. exec.c
  111. feature_to_c.sh
  112. gdbstub.c
  113. gdbstub.h
  114. gen-icount.h
  115. host-utils.c
  116. host-utils.h
  117. hpet.h
  118. hppa-dis.c
  119. hppa.ld
  120. hxtool
  121. i386-dis.c
  122. i386.ld
  123. ia64-dis.c
  124. ia64.ld
  125. input.c
  126. ioport-user.c
  127. ioport.c
  128. ioport.h
  129. iov.c
  130. iov.h
  131. json-lexer.c
  132. json-lexer.h
  133. json-parser.c
  134. json-parser.h
  135. json-streamer.c
  136. json-streamer.h
  137. keymaps.c
  138. keymaps.h
  139. kvm-all.c
  140. kvm-stub.c
  141. kvm.h
  142. libfdt_env.h
  143. LICENSE
  144. linux-aio.c
  145. m68k-dis.c
  146. m68k-semi.c
  147. m68k.ld
  148. MAINTAINERS
  149. Makefile
  150. Makefile.dis
  151. Makefile.hw
  152. Makefile.objs
  153. Makefile.target
  154. Makefile.user
  155. microblaze-dis.c
  156. migration-exec.c
  157. migration-fd.c
  158. migration-tcp.c
  159. migration-unix.c
  160. migration.c
  161. migration.h
  162. mips-dis.c
  163. mips.ld
  164. module.c
  165. module.h
  166. monitor.c
  167. monitor.h
  168. nbd.c
  169. nbd.h
  170. net-checksum.c
  171. net.c
  172. net.h
  173. notify.c
  174. notify.h
  175. osdep.c
  176. osdep.h
  177. path.c
  178. pci-ids.txt
  179. poison.h
  180. posix-aio-compat.c
  181. ppc-dis.c
  182. ppc.ld
  183. ppc64.ld
  184. qbool.c
  185. qbool.h
  186. qdict-test-data.txt
  187. qdict.c
  188. qdict.h
  189. qemu-aio.h
  190. qemu-barrier.h
  191. qemu-binfmt-conf.sh
  192. qemu-char.c
  193. qemu-char.h
  194. qemu-common.h
  195. qemu-config.c
  196. qemu-config.h
  197. qemu-doc.texi
  198. qemu-error.c
  199. qemu-error.h
  200. qemu-img-cmds.hx
  201. qemu-img.c
  202. qemu-img.texi
  203. qemu-io.c
  204. qemu-lock.h
  205. qemu-log.h
  206. qemu-malloc.c
  207. qemu-monitor.hx
  208. qemu-nbd.c
  209. qemu-nbd.texi
  210. qemu-objects.h
  211. qemu-option.c
  212. qemu-option.h
  213. qemu-options.hx
  214. qemu-queue.h
  215. qemu-sockets.c
  216. qemu-tech.texi
  217. qemu-thread.c
  218. qemu-thread.h
  219. qemu-timer.c
  220. qemu-timer.h
  221. qemu-tool.c
  222. qemu-x509.h
  223. qemu.sasl
  224. qemu_socket.h
  225. qerror.c
  226. qerror.h
  227. qfloat.c
  228. qfloat.h
  229. qint.c
  230. qint.h
  231. qjson.c
  232. qjson.h
  233. qlist.c
  234. qlist.h
  235. qobject.h
  236. qstring.c
  237. qstring.h
  238. readline.c
  239. readline.h
  240. README
  241. rules.mak
  242. rwhandler.c
  243. rwhandler.h
  244. s390-dis.c
  245. s390.ld
  246. savevm.c
  247. sdl.c
  248. sdl_keysym.h
  249. sdl_zoom.c
  250. sdl_zoom.h
  251. sdl_zoom_template.h
  252. sh4-dis.c
  253. softmmu-semi.h
  254. softmmu_defs.h
  255. softmmu_exec.h
  256. softmmu_header.h
  257. softmmu_template.h
  258. sparc-dis.c
  259. sparc.ld
  260. sparc64.ld
  261. sysemu.h
  262. targphys.h
  263. tcg-runtime.c
  264. texi2pod.pl
  265. thunk.c
  266. thunk.h
  267. TODO
  268. translate-all.c
  269. uboot_image.h
  270. usb-bsd.c
  271. usb-linux.c
  272. usb-stub.c
  273. VERSION
  274. vgafont.h
  275. vl.c
  276. vnc-auth-sasl.c
  277. vnc-auth-sasl.h
  278. vnc-auth-vencrypt.c
  279. vnc-auth-vencrypt.h
  280. vnc-encoding-hextile.c
  281. vnc-encoding-tight.c
  282. vnc-encoding-tight.h
  283. vnc-encoding-zlib.c
  284. vnc-tls.c
  285. vnc-tls.h
  286. vnc.c
  287. vnc.h
  288. vnc_keysym.h
  289. vnchextile.h
  290. x86_64.ld
  291. x_keymap.c
  292. x_keymap.h