1
0
Fork 0
Commit graph

29 commits

Author SHA1 Message Date
krcroft
8c6758c8d1 Memory overrun and C++11 updates
- Limit write length into buffer, and add comment about corner-case
- Use C++11's syntax to explicitly remove private copy and assignment operators
- Use C++11 container loop syntax to shorting a cleanup function
2019-12-07 19:08:47 +01:00
krcroft
cff6b05559 Improve memory safety in the DOS Drive Cache class
- Fix Bitu printf format type
- Check a pointer prior to dereferencing it
- Prevent writing one-beyond the last index
- Replace strcpy with with helper safe_strcpy, provided by @dreamer - thank you!
- Replace strcat with strncat
- Add constructor intializers for scalars and arrays
- Initialize and replace 0-value pointers with nullptr
- Pass in the buffer length when strncpy'ing into a function variable
2019-12-07 19:08:47 +01:00
krcroft
eaeb001b17 Play into subsequent track(s) if playback length exceeds the the current track
Issue reported by Dagar and Pr3tty F1y, and confirmed as a bug by ripsaw8080.
Thank you!

This fixes the GoG release of Betrayal at Krondor which (either due to CD mastering
issues or a faulty rip), requests playback of a given track at the tail end
of the prior track.

In debugging and performing this fix, many debug messages were improved as well
as making some small small code adjustments, such as using iterators to point to
individual tracks (track->attribute) instead of using the tracks array
(tracks[track -1].attribute).
2019-11-24 17:34:54 +01:00
Peter Veenstra
1fbaff47fc Update year and address of FSF
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4183
2019-01-25 14:09:58 +00:00
Peter Veenstra
5bb10db88b Time keeps on ticking
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4109
2018-05-29 12:58:58 +00:00
Peter Veenstra
54c993669a Strip spaces properly. Fixes bug #480
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4100
2018-05-06 19:34:22 +00:00
Peter Veenstra
6cf39c1fc6 Years update
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4021
2017-05-30 11:35:08 +00:00
Peter Veenstra
0f4c92ca32 Year update.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3878
2015-01-06 14:40:32 +00:00
Peter Veenstra
2fea508f7f Year update
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3812
2013-01-15 09:03:13 +00:00
Peter Veenstra
999f33de27 Update year. Remove CVS tags
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3700
2011-04-26 09:34:55 +00:00
Peter Veenstra
a78b2c4f8b Update year
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3548
2010-02-11 13:36:50 +00:00
Peter Veenstra
16d14b78e1 Some year and version numbers
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3410
2009-05-27 09:15:42 +00:00
Sjoerd van der Berg
88caf1dc71 Add compiler testing for always_inline attribute
Add compiler testing for fastcall attribute
Add the FASTCALL define to visual c
Remove some overkill inline routines
Make sure that all the inline routines in headers are static


Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3355
2009-04-25 16:25:03 +00:00
Peter Veenstra
bd88bcea69 Add low- and uppercase for std::string.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3078
2008-01-13 11:28:41 +00:00
Peter Veenstra
fdd16dea1a Happy New Year\!
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2728
2007-01-08 19:45:42 +00:00
Peter Veenstra
132bbffb68 Add part of patch 1235377 of msharov and fix a few small bugs in the return values of the cpu cores
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2593
2006-04-11 19:02:33 +00:00
Peter Veenstra
df67775306 time passes on and on....
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2480
2006-02-09 11:47:57 +00:00
Peter Veenstra
c7c2ee5d5a Add patch 1239754 from Moe. This patches fixes a few crashes by checking the SDL_SetMode return value and it changes strncopy to a safe_strncopy which adds a 0 to each string copied
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2240
2005-07-19 19:45:33 +00:00
Peter Veenstra
224ef1a68b new include system + lot's of classes maintaining certain aspects of dosbox
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2140
2005-03-24 21:11:05 +00:00
Peter Veenstra
2094d8b985 Year update
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2106
2005-02-10 10:21:12 +00:00
Peter Veenstra
4e69d3bf7a Made all string functions more aware of systems with reverse signed unsigned defaults
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2027
2004-10-17 14:54:41 +00:00
Peter Veenstra
ca409fd57c Typo in preamble
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1899
2004-08-04 09:12:57 +00:00
Sjoerd van der Berg
b3e0ba59e5 change const char * to char * for the trim functions
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1872
2004-07-05 12:00:26 +00:00
Sjoerd van der Berg
c7e25e08b7 Add some new function and clean up
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1793
2004-05-11 18:58:18 +00:00
Peter Veenstra
fcbd0fe854 Copyright to 2004
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1552
2004-01-10 14:03:36 +00:00
Peter Veenstra
87216faa9b Added patch 826821 from phearbear
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1382
2003-10-27 14:16:59 +00:00
Peter Veenstra
4ff5924eb1 changed upcase and lowercase code.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@582
2002-12-17 18:32:02 +00:00
Sjoerd van der Berg
dd95e35dd3 Removed wildcmp
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@341
2002-10-18 09:18:16 +00:00
Sjoerd van der Berg
42e5d0b779 First CVS upload.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@80
2002-07-27 13:08:48 +00:00