Kaynağa Gözat

Fixed attribute buffer allocation for overruns and unnaturally large attributes

git-svn-id: https://svn.microneil.com/svn/CodeDweller/trunk@111 d34b734f-a00e-4b39-a726-e4eeb87269ab
wx
madscientist 8 yıl önce
ebeveyn
işleme
36b03c855e
1 değiştirilmiş dosya ile 6 ekleme ve 4 silme
  1. 6
    4
      configuration.cpp

+ 6
- 4
configuration.cpp Dosyayı Görüntüle

) { // then translate the content! ) { // then translate the content!
// Create the Content buffer... // Create the Content buffer...


int BfrSize = Stopdex - Startdex; // How big a buffer do we need?
char Bfr[BfrSize]; // Make one that size.
int BfrSize = Stopdex - Startdex +1; // How big a buffer do we need?
vector<char> heapBfr(BfrSize,0); // Make one that size.
char *Bfr = &heabBfr[0];


copyDataCountLines(Bfr, Data, Startdex, Stopdex); // Get our data and ignore our lines. copyDataCountLines(Bfr, Data, Startdex, Stopdex); // Get our data and ignore our lines.




// Read our data. // Read our data.


int BfrSize = Stopdex - Startdex; // How big a buffer do we need?
char Bfr[BfrSize]; // Make one that size.
int BfrSize = Stopdex - Startdex +1; // How big a buffer do we need?
vector<char> heapBfr(BfrSize,0); // Make one that size.
char *Bfr = &heabBfr[0];


NewLines += copyDataCountLines(Bfr, Data, Startdex, Stopdex); // Get our data and count our lines. NewLines += copyDataCountLines(Bfr, Data, Startdex, Stopdex); // Get our data and count our lines.



Loading…
İptal
Kaydet