mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-30 17:59:02 -04:00
removed two instances of malloc(0) captured by new rs_malloc funtion
This commit is contained in:
parent
d13526facd
commit
d55993d1e4
35 changed files with 73 additions and 56 deletions
|
@ -1,3 +1,5 @@
|
|||
#include <iostream>
|
||||
|
||||
#include <QDesktopServices>
|
||||
#include <QPainter>
|
||||
|
||||
|
@ -72,6 +74,8 @@ void RSTextBrowser::paintEvent(QPaintEvent *event)
|
|||
|
||||
QVariant RSTextBrowser::loadResource(int type, const QUrl &name)
|
||||
{
|
||||
std::cerr << "TEXTBROWSER loading ressource: type=" << type << " url=" << name.toString().toStdString() << std::endl;
|
||||
|
||||
if (mShowImages || type != QTextDocument::ImageResource || name.scheme().compare("data", Qt::CaseInsensitive) != 0) {
|
||||
return QTextBrowser::loadResource(type, name);
|
||||
}
|
||||
|
|
|
@ -151,7 +151,7 @@ class SignatureEventData
|
|||
{
|
||||
// We need a new memory chnk because there's no guarranty _sign nor _signlen are not in the stack
|
||||
|
||||
sign = (unsigned char *)rs_safe_malloc(_signlen) ;
|
||||
sign = (unsigned char *)rs_malloc(_signlen) ;
|
||||
|
||||
if(!sign)
|
||||
{
|
||||
|
@ -163,7 +163,7 @@ class SignatureEventData
|
|||
signlen = new unsigned int ;
|
||||
*signlen = _signlen ;
|
||||
signature_result = SELF_SIGNATURE_RESULT_PENDING ;
|
||||
data = rs_safe_malloc(_len) ;
|
||||
data = rs_malloc(_len) ;
|
||||
|
||||
if(!data)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue