Advertisement
noteirak

VirtualBox 4.3.28 - VENOM patch

May 15th, 2015
743
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.70 KB | None | 0 0
  1. $ diff VirtualBox-4.3.26/src/VBox/Devices/Storage/DevFdc.cpp VirtualBox-4.3.28/src/VBox/Devices/Storage/DevFdc.cpp
  2. 1740c1740
  3. <     pos = fdctrl->data_pos;
  4. ---
  5. >     pos = fdctrl->data_pos % FD_SECTOR_LEN;
  6. 1964c1964
  7. <     /* XXX: should set main status register to busy */
  8. ---
  9. >     fdctrl->msr &= ~FD_MSR_RQM;
  10. 2142c2142,2147
  11. <     if (fdctrl->fifo[fdctrl->data_pos - 1] & 0x80) {
  12. ---
  13. >     /* This command takes a variable number of parameters. It can be terminated
  14. >      * at any time if the high bit of a parameter is set. Once there are 6 bytes
  15. >      * in the FIFO (command + 5 parameter bytes), data_len/data_pos will be 7.
  16. >      */
  17. >     if (fdctrl->data_len == 7 || (fdctrl->fifo[fdctrl->data_pos - 1] & 0x80)) {
  18. >
  19. 2145c2150,2152
  20. <             fdctrl->fifo[0] = fdctrl->fifo[1];
  21. ---
  22. >             /* Data is echoed, but not stored! */
  23. >             fdctrl->fifo[0] = fdctrl->data_len > 2 ? fdctrl->fifo[1] : 0;
  24. >             fdctrl->fifo[1] = fdctrl->data_len > 3 ? fdctrl->fifo[2] : 0;
  25. 2152,2157c2159,2160
  26. <     } else if (fdctrl->data_len > 7) {
  27. <         /* ERROR */
  28. <         fdctrl->fifo[0] = 0x80 |
  29. <             (cur_drv->head << 2) | GET_CUR_DRV(fdctrl);
  30. <         fdctrl_set_fifo(fdctrl, 1, 0);
  31. <     }
  32. ---
  33. >     } else
  34. >         fdctrl->data_len++; /* Wait for another byte. */
  35. 2222c2225
  36. <     { FD_CMD_DRIVE_SPECIFICATION_COMMAND, 0xff, "DRIVE SPECIFICATION COMMAND", 5, fdctrl_handle_drive_specification_command },
  37. ---
  38. >     { FD_CMD_DRIVE_SPECIFICATION_COMMAND, 0xff, "DRIVE SPECIFICATION COMMAND", 1, fdctrl_handle_drive_specification_command },
  39. 2284c2287
  40. <     fdctrl->fifo[fdctrl->data_pos++] = value;
  41. ---
  42. >     fdctrl->fifo[fdctrl->data_pos++ % FD_SECTOR_LEN] = value;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement