aboutsummaryrefslogtreecommitdiffstats
path: root/lv2/lv2plug.in/ns/ext/atom
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-05-27 00:36:51 +0000
committerDavid Robillard <d@drobilla.net>2013-05-27 00:36:51 +0000
commit1b82dc6308fdaa3478b7adfd730977a4415dfdf1 (patch)
treead81383f37c5f966ed2156cebbb595eeeb623796 /lv2/lv2plug.in/ns/ext/atom
parentdda54da26f30f848e6d2ed9d4c8c0c1d921bf5d0 (diff)
downloadlv2-1b82dc6308fdaa3478b7adfd730977a4415dfdf1.tar.xz
Fix crash in forge.h when pushing atoms to a full buffer.
Diffstat (limited to 'lv2/lv2plug.in/ns/ext/atom')
-rw-r--r--lv2/lv2plug.in/ns/ext/atom/forge.h16
-rw-r--r--lv2/lv2plug.in/ns/ext/atom/lv2-atom.doap.ttl8
2 files changed, 16 insertions, 8 deletions
diff --git a/lv2/lv2plug.in/ns/ext/atom/forge.h b/lv2/lv2plug.in/ns/ext/atom/forge.h
index bd6f1e4..c825806 100644
--- a/lv2/lv2plug.in/ns/ext/atom/forge.h
+++ b/lv2/lv2plug.in/ns/ext/atom/forge.h
@@ -184,8 +184,8 @@ lv2_atom_forge_pop(LV2_Atom_Forge* forge, LV2_Atom_Forge_Frame* frame)
static inline bool
lv2_atom_forge_top_is(LV2_Atom_Forge* forge, uint32_t type)
{
- return forge->stack &&
- lv2_atom_forge_deref(forge, forge->stack->ref)->type == type;
+ return forge->stack && forge->stack->ref &&
+ (lv2_atom_forge_deref(forge, forge->stack->ref)->type == type);
}
/**
@@ -536,8 +536,8 @@ lv2_atom_forge_resource(LV2_Atom_Forge* forge,
{ sizeof(LV2_Atom_Object) - sizeof(LV2_Atom), forge->Resource },
{ id, otype }
};
- LV2_Atom_Forge_Ref out = lv2_atom_forge_write(forge, &a, sizeof(a));
- return lv2_atom_forge_push(forge, frame, out);
+ return lv2_atom_forge_push(
+ forge, frame, lv2_atom_forge_write(forge, &a, sizeof(a)));
}
/**
@@ -553,8 +553,8 @@ lv2_atom_forge_blank(LV2_Atom_Forge* forge,
{ sizeof(LV2_Atom_Object) - sizeof(LV2_Atom), forge->Blank },
{ id, otype }
};
- LV2_Atom_Forge_Ref out = lv2_atom_forge_write(forge, &a, sizeof(a));
- return lv2_atom_forge_push(forge, frame, out);
+ return lv2_atom_forge_push(
+ forge, frame, lv2_atom_forge_write(forge, &a, sizeof(a)));
}
/**
@@ -582,8 +582,8 @@ lv2_atom_forge_sequence_head(LV2_Atom_Forge* forge,
{ sizeof(LV2_Atom_Sequence) - sizeof(LV2_Atom), forge->Sequence },
{ unit, 0 }
};
- LV2_Atom_Forge_Ref out = lv2_atom_forge_write(forge, &a, sizeof(a));
- return lv2_atom_forge_push(forge, frame, out);
+ return lv2_atom_forge_push(
+ forge, frame, lv2_atom_forge_write(forge, &a, sizeof(a)));
}
/**
diff --git a/lv2/lv2plug.in/ns/ext/atom/lv2-atom.doap.ttl b/lv2/lv2plug.in/ns/ext/atom/lv2-atom.doap.ttl
index d5e4d29..4c5fc68 100644
--- a/lv2/lv2plug.in/ns/ext/atom/lv2-atom.doap.ttl
+++ b/lv2/lv2plug.in/ns/ext/atom/lv2-atom.doap.ttl
@@ -12,6 +12,14 @@
doap:created "2007-00-00" ;
doap:developer <http://drobilla.net/drobilla#me> ;
doap:release [
+ doap:revision "1.5" ;
+ doap:created "2013-05-26" ;
+ dcs:changeset [
+ dcs:item [
+ rdfs:label "Fix crash in forge.h when pushing atoms to a full buffer."
+ ]
+ ]
+ ] , [
doap:revision "1.4" ;
doap:created "2013-01-27" ;
doap:file-release <http://lv2plug.in/spec/lv2-1.4.0.tar.bz2> ;